When you're depressed, never trust your own brain's assessment of your situation. It
always shows you a selectively bleaker picture than the actual reality. It's never as bad or as bleak as your brain is making it seem to you.
It's a weird effect because your brain should be doing the opposite, trying to heal you by showing you a selectively happier picture than the actual reality. When your body gets sick, your immune system goes to work trying to cure it. So why doesn't your brain do the same thing when it gets sick - try to heal you instead of making you more sick?
Maybe it's a bug in our programming, who knows. But recognize it for what it is, a flaw in our automatic neurological response to the illness of depression. So the cure can't be automatic, it must be deliberate. Start by learning to see through the flawed response, to see it for what is, like Neo seeing the Matrix for the first time.
Do not trust the false world that has been pulled over your eyes to blind you from the truth - nothing is as bad or as hopeless as it seems when you're depressed. As long as you're alive, there's always a way forward into a different and better reality. You just have to find it.
To find it, start by relying on experimentalism. Change your routine, your activities, the way you spend your time. It honestly doesn't even matter what you change to, as long as you change to something. Throw a dart at a newspaper on the wall, and if it lands on a new activity, try that. Try everything, even things outside of your comfort zone.
And if the first things you change to don't help, discard them and try others. It takes about a month of trying something new to know whether it's having the desired impact or not, whether it's lifting weights to get stronger, doing a Keto diet to drop fat weight, learning Rust, taking sailing/bjj/dance/etc lessons, or whatever. So stick with each thing for at least a month and then evaluate how you feel and if it's worth continuing or not.
Trying new things rewires your neural pathways in new ways, stimulating positive creative energy. So if you can do those two things - stop trusting your brain and seeing through the falsely bleak picture it's presenting you with, and systematically going out and doing and trying new things to connect new neural pathways, you might start feeling better.
Beyond that, try to think of depression like any other programming or math problem, and always be hacking it. Apply the same systematic, methodical, analytical problem solving skills to depression that you use in programming. Explore the problem space, test different solutions, iterate until you find optimal, or at least sufficient, ones.
PS - and make sure you're getting enough Vitamin D and B12 too. 5000IU daily of D, and I forgot how much B12 but more info here: https://www.mayoclinic.org/diseases-conditions/depression/ex...
Additionally, some herbal supplements like Ashwaghanda, Rhodiola Rosea, and Chinese Skullcap can help neutralize cortisol buildup that causes anxiety and makes it more difficult to get out of depression.
PPS - also check out the many useful niche subreddits. Some I've found helpful over the years:
https://www.reddit.com/r/Fitness/
https://www.reddit.com/r/gainit/
https://www.reddit.com/r/loseit/
https://www.reddit.com/r/EOOD/
https://www.reddit.com/r/ScientificNutrition/
https://www.reddit.com/r/ketoscience/
https://www.reddit.com/r/keto/
https://www.reddit.com/r/Paleo/