What's the difference between someone who succeeds and someone who perceives failure? A growth mindset.
Learning from "mistakes" is one of the key components of progressing through life gracefully.
I'm not saying it's easy, but the next time something doesn't go according to plan - pause - and look at what it has taught you.
Then resolve to learn the lesson quickly, so you can move through life, wiser from the experience.