There's of course several answers here.
Some people would advice to open more tables and focus only on the poker, but I'd personally suggest staying with a number of tables you are comfortable with as more tables without feeling ready/able for that amount can lead to leaks growing and automation in your play, which is a bad thing.
Something that I believe TwiceT has mentioned a few times is (And I may paraphrase a little) "I may not study as much as some other people off the tables anymore, but when in a hand my thought process is going through all options and alternatives and I spend far more mental energy considering contingencies during the hand", this is another great way without increasing tables to increase your involvement and focus on each table while also evolving your game and optimizing your play. Obviously this requires more attention(which means you wouldn't have time to look at funny pictures and post on the forums), and as a side effect of this it may lead to your mental energy running out faster and your sessions growing shorter until you get used to it.
Suggestion/Answer #3 is an important one for anyone who ever wants to ever succeed in online poker. Short and to the point, I present: "Discipline!"
There are many more options no doubt, and surely we're all guilty of some level of letting ourselves be distracted(except maybe some of the pros :P), but the single worst alternative is to do nothing about it, for sure.
It'll be interesting to see what other users can offer, perhaps depending on the turnout and exposure of this thread, if needed we may later move it to General Poker Discussion and see if that'll spark more interest, but I believe it's well placed where it is for now.
Regards,
Richard