I have always believed that failure and success go hand in hand. The former always precedes the latter.
As Henry Ford would put it:
Failure is only the opportunity to begin again more intelligently.
Every time you fail no matter how big it was; cheer up! You are better the next time around.