When you are stressed- in other words, when your body reacts to major life events and stressors, then this can trigger hair loss (García-Hernández et al., 1999). Hair loss is also known as alopecia. Alopecia also commonly co-occurs with anxiety and depression.
So when you are stressed and your hair is falling out, then addressing your stressors and coping better can help to reduce your hair loss.
Reference:
Alopecia areata, stress and psychiatric disorders: a review. García-Hernández MJ, Ruiz-Doblado S, Rodriguez-Pichardo A, Camacho F. J Dermatol. 1999 Oct;26(10):625-32