Hi fellow successful dev!

You have more or less exactly the same story I had at the start of my career. Im just about 5 years a head of you. So I am hoping this advice can help save some of my 'wasted' years.

I went through a period about 4-5 years ago of similar depression and for me it was real burn out induced depression. Though at the time i would never had thought i was anywhere near burnout. I was getting accolades at work, promotions and more money, had a beautiful girlfriend who was very supportive. Life should have been good. It was truely the worst time in my life.

I only began the process of finding out what was wrong with me because i couldn't sleep and got so exhausted I was physically struggling to get out of bed. Like the signal from my brain was not reaching my legs when i wanted to swing out of bed. I thought I had cancer or something along those lines. I was 6'4" and 136 pounds. Went to the GP, did all sorts of tests, I think the GP was humouring me and building up the idea it was burn out induced anxiety and depression.

Went to a psychiatrist (best choice I ever made). She helped deal with the anxiety and the immediate acute suffering, also helped me regulate life so I wasn't destroying myself. I opted to not take any drugs to help, she taught me breathing techniques and thought patterns to build up some mental resilience/mindfulness. But the most important thing she told me was this. Your mind and your body are soo intrinsically connected. She told me I should start exorcising for 45mins a day of vigorous exorcise.

I definitely had never really considered the mind body connection in any more depth than a pass comment at a party or something. But it's very true, they're the same thing. It took me at least a year and a few false starts after that to really get going properly. But go to the gym and work yourself into the ground. At first it will feel shit, you wont really see any improvements for a few weeks to a few months.

But push through that and it more or less fixed everything for me. I swear in the first year of working out I gained like 10-20 IQ points. My mind is sooo much more clear, I can hold so many more variables in my head at once. Programming is fun again, literally colours are brighter, life is fun again. I don't have any neck, shoulder or back pain everything feels great. I now go to the gym minimum 4 days a week and I am so certain its this that has helped me, because if I miss even a week I start to slip into depression again. My sleeping pattern gets fucked, I eat bad (shitty food at shitty times), things start to get increasingly bad. I then go back to the gym and almost overnight things start getting better.

The last piece of advice I can give is get a PT when you start out. Signup for a minimum of two sessions a week for 3 months. I don't need a PT to help me with technique or to show me how to use the equipment properly any more (I definitely did for the first 6 months). But despite me knowing how important working out is, I almost never want to do it. Having a PT is really important for my motivation. During harder weeks having an external motivator of 'I have paid for the session I have to go', or 'Roger is waiting for me I can't cancel now' is really helpful.

Sorry for the wall of text and I hope that helps