Failure or Success are Optional
Human being came out with rigid expressions that don't fit the dynamic nature of life. The subjective notion of failure has probably claim far too many victims. Success is also a relative term because what is success for one maybe failure to others.
Everything that happens to us is always an opportunity to learn something to either keep or stop doing. If we can learn from it, why should anyone consider it a failure?
The key is to always focus on your efforts and not the outcomes because the latter is outside of your control. If you learn to be satisfied with your best efforts, then that is all you have, can do, and can offer. If your best effort is not enough, then seek help but never quit trying. The moment you decide to quit becomes a failure because success will not come to you if you quit seeking by trying. Take a detour, a step back, or trying something else if you have to, but never quit trying.