You will get injured. You will lose when you really should have done better. You will make poor decisions, invest in a bad coach, and suffer a plethora of setbacks. Both in training and wider life.
What matters is not whether or not you experience these things (you did). What matters is how you respond.
Are you going to maintain perspective? Can you get enough "height" that you can see how insignificant this whole thing is? That in fact our lives are trivial and this "big problem" is barely perceptible.
Can you get close enough that you can see the simple next step? In doing so, removing overwhelm and fear...
That’s keeping perspective.
Are you going to learn from what just happened? Can you genuinely come out the other side of this a better person than you would be without this "negative" event?
Are you going to use this time as an opportunity to practise who you are training to be under pressure?
Are you going to remember what you are on your way to achieving, who you are becoming, how you’re planning on getting there, and where you’ve come from?
Will you choose your narrative instead of choosing victim-hood?
That’s mindset - the ability to separate the internal from the external and maintain control of the most essential one of those.