It's important to emphasize that failure does not diminish the goal or the attempt. Most (all?) of us are afraid of failing. So we don't attempt (which is failing) or we attempt timidly (and fail) or we quit after our first failure.
My approach to overcoming the fear of failure is to remind myself that one of my life goals should be to fail often. Try different approaches. Learn different ideas. Maybe I was just unlucky in my first five attempts. Try, try, try.
Consider Gerald M. Weinberg's take on failure:
[S]ooner or later everybody stumbles. It helps to understand why you stumble, but most important things can be explained only in jokes, riddles, and paradoxes. Survival requires that we learn to laugh things off and start over, which leads us to the next paradox: The business of life is too important to be taken seriously.Seriously, where did we get the funny idea that we won't fail?