I tried improving diet/exercise/sleep like the other commenters suggest, but of course the depression makes that nearly impossible. The only thing that actually helped me was burning all the way out, quitting my job, and going back to blue collar work. I don’t work from home anymore and I make less than half of what I made as a dev, so it was a big lifestyle change, but I wish I had done it years earlier.
Anyway, I hope you figure out what works for you. I wasted a lot of my life being depressed and I hate to see others going through it.
You should get a professional who can spend a good hour or two listening to more details of your situation in order to actually help you, as otherwise you'll get a lot of people saying "well stop abusing substances, work less, sleep more, and definitely don't use AI outside work hours", which will work as well as telling an obese person to just eat less.