Don’t shoot the 2nd arrow
You are going to make a mistake; things are going to go wrong; it's not going to go the way you wanted. Sorry! However, you can deal with it well.
According to Buddhist philosophy, any time we suffer misfortune, two arrows fly our way. The first arrow is the actual bad event, which can cause pain or just dissatisfaction. The second arrow is the suffering. That's actually optional. The second arrow represents our reaction to the bad event. It's the manner in which we choose to respond emotionally.
If we shoot the second arrow, it becomes a double-whammy: things go wrong/we don't get what we want, plus we make ourselves feel bad, give ourselves a hard time in an unhelpful way and so on.
This does require us to be mindful, to be aware and to notice what's happening, and it may also require us to be compassionate towards ourselves (accepting, non-judgmentally, with kindness). Being mindful, aware, in the present moment and observing if we can, will help to keep the temperature down so we can take stock and steer clear of unhelpful reactions/thoughts/behaviours.
If we're not mindful, we can make the worst of (bad) situations rather than the best.
There are of course some circumstances or situations - if something deeply personal happens - where it's difficult to be rational and detached. This will lead us to react in ways we wouldn't recommend to others or our children for example.
So, when you do make a mistake; things don't go to plan; something bad happens; (or on a smaller scale) you get caught in the rain or miss the train - the first arrow arrives - let's be mindful, accepting and compassionate towards ourselves, and reject the second arrow.
We will all get the first arrow; stuff happens, life isn't fair and so on. Try and notice it if you're about to, or you've already shot the second arrow: you're less likely to get stressed, deal with people/things badly and suffer as a result.