The ship has sailed/ Life is a losing game mentality

I am 38 years old and for the last 8 years, I have this feeling about life in general that the ship has sailed and I have missed it. Or that I am playing a game of chess and reached the point when you know there is no way you can win the game. So what is the point of carrying on? I am not suicidal. But it’s this constant feeling of weariness that there is no point in trying because things won’t get better anymore – that I have reached my limits in terms of career progression and personal growth. How do I get out of this self-defeating loop of thinking?