Failure is good. It makes you a stronger person.
Sure it sucks, and it may take a long time to recover from your failures (Little over four years for me), but guess what? You get past them, and as a result you are better off.
I used to allow the fear of failure to control my life, and it's only been recently (last eight or so months) that I have broken free of my cycle of fear and have instead embraced it as an opportunity to do better and to improve myself.
The work that I do right now has a high difficulty learning curve, but in the week and half that I have been doing my new duties I have become more comfortable and accepting of my own ignorance and failings. When I mess up, I no longer dwell on it, instead I move on and learn from it. I basically convert all of my negative energy into positive energy that fuels me through out the day.
Fear no longer controls my life, instead I only focus on the things that I can control, and when things beyond my control happen, I step back and I learn from it.
An open mind, and a willingness to learn have been my greatest keys to success coupled with the fact that I have managed to stay consistently awesome for the past eight months that I have been working have moved me closer to my goals than anything else.
TL; DR Don't be afraid to fail, you'll learn from it and do better. Improve.