I know how you feel. I've had the same struggles at times. It is difficult for me to be motivated to do anything if I do not feel well. This kind of gets me into a Catch 22 because I don't feel well so I don't do the things that are going to make me feel better.
I really had a break through by slowly realizing that I could will myself to small action regardless of my mental and physical state. Then I would focus on making small increases of positive action day after day. Eventually the right action created better physical and emotional states. Then I was off and running.
You have complete control over your mental outlook. Choose to be positive even when your circumstances would encourage you to be negative.
God Bless you and Guide you on your way to better health,