I felt similar a number of times - about running, about getting a PhD and making myself harder to employ rather than easier, about writing research papers that I thought were great - but nobody even read. Somehow, things worked out in the end, but it was a long slog sometimes.
Eventually, I just decided to do what I like. Study history, learn about meteorology, try cooking, drink whiskey now and then, reconnect with old friends and family, travel to other counties, flirt with my wife, and I am having the time of my life. I don’t think too much about the past (can’t change it) or the future (how much time is there?). I can only control what I do each day as it comes, and I don’t like wasting any days.
Oh, I did not mention surviving cancer. Once you think you’re about to die, you really learn how great it is to be living.