Try to do a digital-free holiday (no computer, phone etc) for 1-2 weeks. See if you attention span or focus is messed with by constant distractions (or the often called "dopamine addiction") instead of caffeine. Or instead, try to meditate at least 20mins a day for a couple of weeks. I personally don't think doctors would ever advice this, as the whole attention loss/focus/internet addiction thing is to new and not widely researched.