I've been in some dark places myself with it all culminating about 4 years ago with the birth of my son and I had everything going "right" and all the things you claim to desire. I had a successful small ad agency, was married, lived in a cool city, etc. and yet was still in a dark place. Don't fall into the trap thinking that simply ticking these boxes will improve your life, certainly material changes to things can make a big difference but they won't "solve" it. I emphasize this because most of the advice here is focused on changing your material condition (which makes sense this is a forum dominated by engineers) but that isn't the whole story.

I would also question your analysis of the situation which seems to rest on this mistaken understanding of time. Plenty of people have everything you want and die at 50 or younger. Plenty of people are in your shoes and live to be 100. Don't assume you do or don't have time left to do these things.

Years of therapy started me on the path. Progress was slow at first, gradual for a long time, and then I seemingly hit a number of breakthroughs that really accelerated things in the past year. The biggest things you can do today, yes today, are get your diet in order if it isn't already, start going to the gym regularly if you aren't already, meditate daily (it actual changes the structure of your brain). There's some evidence that ice baths and sauna bathing can help a lot. (It did for me). I listen to the Huberman podcast and if you're scientifically minded he's a Stanford neurologist who talks through things that can help like depression, anxiety, etc on a chemical level and how it can help us improve our lives. Also if you're a big drinker or use some sort of drugs you need to work first off towards moderating those or consider entirely eliminating them from your life for at least the short term. I entirely stopped drinking for 6 months and now it's an extremely rare occurrence. It's not going to fix things but it will keep them from getting worse.

Longer term don't be afraid to explore meds if needed (with the advice of a doctor of course), despite the wide demonization they get from others in tech adderall changed my life significantly for the better (but know it's a push not a silver bullet). In the process with therapy I learned not to hate myself, I found (re-found) my religion, and am starting to make genuine friendship and connections. I also found the writings of Marcus Aurelius in Meditations to be extremely useful. If the literal emperor of Rome felt like how I do every day surely I am not alone.

Is my life perfect? Not at all. Did material things like changing my job, moving half way across the country, cutting old friendships etc help? Absolutely! The above list sounds borderline cliche and it basically is because the advice works. My biggest thing I want to emphasize though is that start slow. Don't shift perfectionism to your self improvement. Again emphasizing diet and exercise even a 15 minute walk a day and cutting our processed foods can do more than you think and you can't talk your way out of biology. Email is in my DMs if you want to talk. We're all in it together. I once heard that the whole universe is love. We're either all screaming out for love (through sadness or anger or both) or we're giving it. It sounds so flippant but it really is true. Hope this helps and hope you find your path. If it's any help I'm a total stranger and odds are we'll never chat but know I am rooting for you.