Choosing to enjoy life today instead of waiting for tomorrow for that enjoyment isn't a failure, it's a choice. It comes with risk and tradeoffs.
Everyone thinks there's a magical line that everyone else should take that straddles that line between enjoyment today and tomorrow. That lines doesn't exist, and isn't even the same from day to day.
Looking back and regretting a lifetime of decisions is caused that the consequences from those earlier decisions. Once that weight becomes too heavy, the regret sets in.
IMO, the way to combat that is two-fold.
First, in the moment, be conscious of what the risks are, and if they are worth it. If they aren't, take pride in settling for less at the moment so you can safeguard your future. You're doing something hard and good, and it should feel good in itself to do it.
Second, when you look back, remember the joy you had at the time. It was judged, to the best of your ability, to be worth it at the time, and you should continue to feel warm and fuzzy from that joy today, even if bad things have come about as consequence for it.
For instance, like the author, I gained rather a lot of weight. Then I lost most of the excess. Then I gained half of it back. Every day is now a struggle to try to get my weight back down, and my blood pressure is back up so high I couldn't have dental surgery safely the other day, and I'm back on medication.
According to the author that's a failure, but I had a lot of really, really enjoyable meals. I ate the vast majority of them with friends and family. Many of them were either cooked by family, or were special occasions. Calling those meals "failures" now would be saying that it was a mistake to enjoy that time with my family and friends, and it absolutely wasn't.