You might have internalized a morality that says productive = good, lazy = bad. It's not exactly uncommon, has been giving me anxiety for years and I still can't shake it off.
What helped me a lot is to actually throw the moral compass away. I.e. not thinking "lazy is not bad", or "lazy is good", or anything like that, but just straight out rejecting the division of my actions and inaction into good or bad, stopping judging myself. It's when I can stop forcing myself to do something based on that morality, I can actually find enough energy to do things that are worth doing, e.g. fasting and exercising, contributing to open-source or educating myself with some quality popular science books.
But it also comes with the fact that some days will be shitty where you would only wanna sit home and lay in bed or play video games. Feeling guilty for this not only doesn't speed up the "healthy" acts, in fact it only builds disgust for those things as you can only do them from obligation. And as disgust is built more and more, I even forgot how to want stuff that doesn't give instant gratification.