I have similar work habit and, though I wouldn't say it was due to depression, I will become guilty and/or anxious when I'm in one of my low-productivity phases.
I mean, what is my potential, really? What is that word actually referring to? Is it a real feature of the world? Does it simply refer to whatever the outcome is of me trying as hard as possible to develop my capabilities in some domain? And if so, is that intrinsically good, or is it just instrumental to some other thing?
Of course, when we die there are no bonus points for how many code commits we made or projects we built or companies we started. So I wonder: should I feel guilty for doing nothing? If I was able to not feel guilty about doing nothing, would that be okay too?
I'm trying to just handle it by not worrying as much and accepting that I just work in spurts.