Story of my life.
Started CS in the age of 13 flunked out after 2 years. Been in & out of universities (mainly CS & philosophy) ever since, attracted to the ideal, disgusted by reality.
All my life I abandoned most projects that took more than a a few weeks, but did some very cool things in these short time spans.
But I think I found the cure, at least for me, a project that is superbly compelling...
Suddenly my highs were longer and the lows not so low, and I have been finally been able to apply myself to a single project for a long time, over a year now.
I think you need to find a project that will captivate you like the Everest captivated Sir Edmund Hilary, a monumental challenge in a field that interests you.
Mine is developing a new machine learning algorithm.