Failure doesn't mean defeat. It doesn't mean your life is ruined and you didn't work hard enough. You don't need to beat yourself up over as simple as that.
Even if you fail, even if you don't reach your goal, it's okay. Find the strength to move past it, rely on those around you and on yourself. If you can move past a failure, then you are stronger than you ever would have been if you'd succeed the first time.