several strategies that have worked for me: 1. get yourself checked out for ADD. I'm not saying this is the problem, but it's easy to check for, and if it is the problem, there are drugs that can at least temporarily make the problem just go away. Now if this is something you've never experienced until just now, it's probably not ADD. But if you've had these sorts of problems on and off forever, (I know for me, my pe…
Do NOT let this relatively easily solvable problem destroy your career. I made this mistake early on in my career and paid for it with a lost job. I'm glad things ended up the way they did, but it would have been better if I left there on good terms.
Even if medication is a temporary fix, it might be what this situation calls for. Often in life we have to chose the best of two evils, and your career is not something to put on the line. I know that I am way happier working 40 hours a week steady than I was when I would binge hack for 120 hours straight while riding a motivation wave.
If you can get yourself back into the groove and being productive, try to figure out what gives you motivation and try to work your way into a position that continuously feeds you these things. That's what I'm working towards.