If I have to persevere, then I do. It doesn't require inspiration. It's just doing whatever thing is mandatory.
If it's not mandatory, then I take my best guess about the long-term outcome. And if the risks seem to outweigh the rewards, I quit, and do whatever seems better.
I've got a lot of reasons for that, but the primary one is me sticking with my startup for waaaaaay longer than anybody would say is reasonable. Winners never quit, and quitters never win, but those who don't win and don't quit are idiots.
Although, I'm not sure I can think of any genuine adversity that one could simply walk away from as you seem to claim to be able to do.
How do you quit a major illness? Systemic prejudice? Homelessness? Imprisonment? War? Famine? Runaway inflation? Depression? Suicidal Ideation? Eating Disorders? Dementia/alzheimers/parkinsons/etc?
Sure, you can sometimes work your way through the situations to the other end, but that's what OP is asking about, isn't it? Where do you get whatever it is you need to make it through? What if there is no way through and the best possible outcome is just dealing with it as in the medical/mental instances?
I guess what the OP wants to know is when you decide to cut it short, and die sooner rather than later, or keep going in the hopes that it gets better.
I don't have good advice for that. Mostly, in dire adversity, I stay alive through sheer inertia. It's better to keep one's options open, and dying cuts off all of the options. That's not inspiration, and I don't think "inspiration" would be a great thing to give even if I had it to offer.