Failure is but a paragraph in the book of each human life. It is the pages that follow that ultimately define us.
I don’t know who said this, but will give attribution if someone knows.
Some give up, some use it as motivation to try harder and some invent failure for extra motivation (Michael Jordan on rivals).
We are all going to go through it. When you do, you should already be thinking about how you are going to deal with the aftermath.