To persist is strength. To start over is super-strength. To give up is human, not failure.
Failing to achieve a particular goal set by you does not mean you have failed in life. Failing to reach the expectations of others/society does not mean you have failed in life.
No one alive is a failure, to achieve anything one must be alive.
The good thing about giving up is: you tried, you learned, and you will try again or you will try something new as long as you are alive.
Whatever it is, give it your best, not your life.