Depends on the situation.
Usually, I need some time to grieve.
Eventually, I compartmentalize, and try to spend less time on being angry or upset, and more time on focusing on things I enjoy and things I can look forward to. Focusing on things you enjoy is very difficult if you are depressed, in fact nothing might be enjoyable if you are depressed. As I get older I’m better at still enjoying things even when other parts of my life suck. I don’t know if compartmentalization is the best way to cope or not.
Bad things happen to good people. Life is unfair. I have to remind myself.
If someone hurts me, I try to put myself in the other person’s shoes to reduce my anger through understanding. That only works for some situations.
I think I would be pretty terrible handling a variety of situations that I can think of. I’d seek out therapy and even medication if my anxiety or depression was acute enough. If I had friends and family to support me emotionally I would be incredibly grateful. I’ve had that in my life and I do not take it for granted. Everyone goes through bad events, there usually are people who want to help and want to understand.