In The Raw
It's not only that tough situations are tough, but it's that they also make you see yourself for who you are. Yes, difficulty gives all of us the rarest of rare opportunities - to see ourselves in the raw. We spend so much our lives dressed up and being on our best behavior. This is what's so great about the thinking, rational part of brains. Our prefrontal cortex (impulse control) keeps everything flowing smoothly, checking and evaluating how we need to show up in life so that we have our best foot forward. However, when those moments of stress and duress show up, and especially really tough situations, to one degree or another we lose our ability to govern ourselves and our behavior.
In those situations it's likely that we can reflexively do something we ordinarily wouldn't do. So as soon as we can afterwards, it would be good to pause and reflect on our reaction. There are many questions we can ask, but one of the most important is if we want more or less of whatever it is we did or said or thought to be true about us. You can almost think of these moments as the interruption we need to either pull back our life's curtain to see what's been hiding back there or spotlight what's been in plain sight all along. The point is that to be confronted with what we're capable of doing or being isn't a bad thing nor necessarily an everyday event. So take advantage of it when it happens to make yourself better.
First thing to do is establish what you did. No, don't sugarcoat it be honest. You have to be clear about what's behind the curtain or spotlighted center stage or you can't address it. Next, and it's already been mentioned, ask yourself do I want more or less of that? Here's a gauge to help you with this: how did it impact and feel to people including yourself? If the answer is not great, then it's time for change.
Last, do something with your new or reenergized intention. There's lots of self-help literature available. Hire a therapist to help you see the present you from the context of your past self. Hire a coach to help you see the present you in the context of the you that you want to become. But take advantage of the moment you're in to make yourself a better person.
Eric