Stress is an interesting one, too little stress and we don't build up a tolerance to it so struggle to cope when it does hit; too much stress and we want to fold, run for a place to hide, curl up and rock slowly backwards and forwards hugging our knees to our chest, we become ill, anxious and physically suffer; but the right amount of stress, the Goldilocks zone, and we can thrive and achieve great things.
The kind of stress that you're talking about would fall firmly into the camp of too much / bad stress.
When stress levels are high, your mood is down and dark, you don't sleep, don't have a drive to eat properly or look after yourself.
Different people have different coping strategies for times like these, some find comfort in destroying themselves in the gym, pushing themselves to the point of collapse, throwing heavy weights on the bar and squatting until the only thought going through their head is one of surviving the next rep. I've seen people turn to training as the one things that they can control when everything else seems to be falling apart, and make great progress because of it.
I'm not saying it's the healthiest option, replacing emotional stress with physical, but it is an option, and can have a kind of purify-by-fire approach.
The way I've always handled stressful times in my life is with a calmer approach.
Back when I used to climb regularly, I'd find that traversing (moving sideways along a climbing wall, instead of up) in a slow and controlled manner a great way to calm me down and help me gain focus and insight into whatever was causing the stress. I've previously heard about this type of thing referred to as mindful movement.
The idea is that you lose yourself so completely in what you're doing, by focusing on the movement, that you kind of lose focus on the cause of the stress and enter a flow state.
Traversing, climbing, certain types of Yoga, Tai-chi, Turkish get-ups, basically anything that forces you to focus on something causing a flow state, can be massively beneficial when dealing with stress.