You may not have have won that appointment or competition. What you created or built today may not be the very best in the whole world. The food you tried your best to cook may have tasted crappy. You may not have delivered your speech right. You may not have had the perfect first date.
You know what's important in all that? The fact that you tried your best given the opportunity. It doesn't matter how these things you've been planning and working on finally turns out. It doesn't really matter if things never went as you thought it would go.
What matters is that you go to bed confident that despite the unexpected outcome, you gave your best in whatever you did. Being able to try your best in any situation you find yourself is something you should really be proud of.
You may not have eventually won the appointment, but at least you were among those selected in the preliminary stages. Your performance may not have been good enough to win that competition, but you tried anyway. At least you made it up to that stage where many others couldn't.
Your speech may not have been so perfect, but you were bold enough to get up that stage, hold that microphone and talk to the audience. Few people can actually do that. Your date with someone may not have been so great as you may have envisioned, but at least you showed up and you broke away from your regular routine to try something new.
The results should not make you give up or think you're a failure. Actually all failures are stepping stones to success. I once said that the formula to success is to fail, fail and keep failing till you succeed. No one gets it right the first time! So be proud that you were able to do something which was your best. Be proud that despite those fears you were still able to push yourself to try.
That's a step in the right direction. The more you're willing to try, the better you become. So never feel sorry for yourself or sad that things never turned out quite well. Pat yourself on the back for at least mustering the courage to try. Tell yourself that you tried your best and be damn proud of it.
Don't ever dwell on any negative outcome. Always try your best and keep on trying it. Never lose hope and never call yourself a failure. You're a winner when you always try your best!