When we are criticised or don't do as well, it can often knock us. In my younger days, I felt this often when I wasn't doing something 'perfectly'. However, I've come to realise that just because one thing hasn't gone as well as you wanted or worked for, it doesn't mean in any way that you cannot improve or that it's the end. In fact, it means you can learn from it.
When we feel we haven't done something as well, we often become fatalistic and lose hope. We think "well there's no point in trying next time". What you have to remember instead is that "it's not over, until it's over". This seems like a really obvious statement, but too often people don't take notice of it.
When we get put down, instead of thinking it's the end, we need to realise we have every opportunity to do better and to change until the day of the event. You have up until that last second before the competition or exam ends to change and improve for the better. Your effort and hard work isn't over until you close that exam paper or pass the finish line. You have every chance.
It's normal to feel down and hurt when your hopes are dashed, but this time we all need to try and climb the ladder to the top again, knowing we have the opportunity, even if the odds are stacked against us. I'm sure there have been many times when you've done better than you thought were possible. In the same way, this can happen even if you think the chances are small; so keep working towards your goals.