The choice at this point is between stagnation and the potential of failure. It's a choice that happens in the pit of your stomach. Opportunity and failure are really two sides of the same coin. Failure is like a description of an opportunity that hasn't payed off yet. If you just give up or don't try then the opportunity won't pay off, but failure isn't often an inevitable part of success. In fact, failure is just part of the process of success.
How does one keep going after failure though? There are many factors which may help someone push through: perseverance, strength of character, emotional support, outside incentive - the list goes on. Something I like to think of personally though is that failure isn't something to be afraid of in the first place. When it happens I try not to get down on myself about it because I know that I just took another step forward or learned something new - or at least gave it another shot. Perhaps I'm just optimistic, but I'd rather be afraid of the fear of failure than of failure itself.