cant give an answer specifically to the question, however as you noticed there are these periods where things just work. id assume that you also are much more able to concentrate in these times?
i have a (remote) diagnosis of adhd as well. i also used to have problems with going through with things i started, i would point this mostly towards depression - and then the short term concentration problems which may have to do with ants thinking.
concentration seems to be quite good at the moment for me. i just started uni again a couple of weeks ago and so far im acing it. not having problems to concentrate on the material very often.
other than that, im learning to stick with things. most in the same way i learned to get active again, just by doing it anyway if i dont feel it. im not yet in the danger zone with uni tho (used to lose my drive after a semester or two).
so maybe the diagnosis is accurate, but rewiring your brain is the way to go? on the other hand, not sure if medication for ahdh would interfere with your cbt at all, if you keep doing it.