I know this feel as I've been in a persistent depressive state for going on 20 years now.
At some point I realized that I was the only one stopping me from getting into shape, and what I needed to do was not give myself the option to not exercise. I knew I was physically capable of doing it, and the lack of energy and motivation were in my head.
The secret to getting into exercising is that very few people are actually super motivated and energetic about it at first. Exercise sucks if you're not used to it. It takes time, it can be boring, it's uncomfortable, and it's a lot of hard work. But, if you stick with it, it becomes something you look forward to. I now can see a noticeable decline in my mood if I skip it for even a week.
My therapist is fond of saying, "You drive your brain, not the other way around." This might initially sound dismissive of the struggle that is anxiety and depression, but what it's really saying is that you do have the ability to take control and be Mindful of your mood and emotions. It's not easy at all, but it's within your power if you work on it. It's fighting the self fulfilling prophecy of, "this is just the way I am."
Of course, I'm saying all of this while I'm actively convincing myself to go workout today.
Edit: I did exercise today, for the record. Today was upper body pull, and I upped most exercises by 5lb