Quite honestly, programming doesn't sound like a good fit. Have you tried doing something physical? Like post office delivery or something.
That sounds like a symptom of depression, not ADHD.
This looks like bipolar disorder, and it is very controllable with right doctor.