I prefer to eliminate the notion of failure in my self-judgment by focusing on metaphysical goals rather than material goals. In the context of what you wrote, If one sets the goal of consistently trying to improve, then material failure is simply a necessary procedure in the process of self-refinement. Nothing wrong with achieving a material goal the first try, but it requires trying. I know that so many times in my life I didn't try something because the material goal intimidated me, but the material goal a symbol for some sense of personal achievement. With the sense of achievement as the goal, trying becomes it's own material goal, and each little self-improvement becomes a success despite the triviality to the overall material goal.