When I get like that, I find it helpful to drink less coffee and switch to a low-carbohydrate diet (mostly veggies, meat, nuts, and dairy). Carbs give you quick and nervous energy, which it sounds like you may have too much of. Fats and proteins burn at a more even pace because the conversion of them into ATP is more complicated. It's hard to go cold turkey on carbs, though, especially the sweet ones, so I usually ease them down over a few days and rarely cut them out entirely. It’s hard to resist a donut from the box of them that arrives in the office a day or two per week. What can I say?<p>Daily exercise--especially when it's vigorous and in the morning--helps me too. My body wants to move, and when it doesn't, my brain seems to compensate by moving itself instead. As such, short walks midday and mid-afternoon also help. I use them like little shots of focus enablers. Second runs preceded by my noon coffee are even better.<p>I have also found it extremely helpful to completely abandon serious efforts at singular focus. Instead, over the past few years, I have lowered the bar and simply engage with (but don't "focus on") whatever I'm doing. To do that, I let behavior--not thoughts--lead the way. Worries about thoughts and motivations ruin my state of mind. When I avoid them, I became more relaxed, which in turn allows sufficient mental engagement to show up on its own when needed. In this relaxed state, the facts in front of me almost automatically trigger appropriate concentration inside of me. Almost... as in 75%. I do still need to be aware that the 75% has been triggered and that the 25% remains for me to do. But 25% is an easier lift than 100%.<p>In the same spirit, I’m generally skeptical of practices like meditation that seem to redirect attention away from our behavior and toward our heads. Objectifying our heads can, for sure, be useful. Minds can, in fact, careen like a ship in a storm, and it is helpful to have a few techniques (diet, exercise, deep breaths, stopwatches, meditation if you need it) to steady them. However, I have also found that worrying about my mind and trying too hard to fix it mostly worsens the situation. Look, minds wander. So what? We're human. Everybody is. Just use a few mind-settling techniques, work a modest amount of mind-wandering into your time budgets, and then roll with it. The ease of mind will pay off way more than punishing yourself for being born human.<p>I do assume you have already turned off notifications on your devices. Those things kill not only focus but sanity too.