Not all time spent on social media, etc., is necessarily ludic; and even if you do wind up in a loop sometimes it's not a big deal. Still, if left unchecked, ludic loops can eat up your time and life and happiness, so let's look at some solutions:
1) Figure out how much ludic stuff you want to do. When helping people budget their time, I recommend starting with an hour a day of escapism. Could be TV, gaming, social media, naps, whatever--the whole point is that you *don't* have to account for it. (Although less is better, obviously.) And you can increase or shrink that amount as needed. Just set a target so the activity doesn't expand infinitely.
Please note that this budgeted escapism is in addition to: (1) social media, etc., done as a necessary and efficient part of your work; and (2) socializing, participatory sports, creative pursuits, and other forms of what I call "replenishing recreation," which are generally authentically pleasurable and life-enhancing (versus escapist).
2) Always work on a "vanilla" computer that doesn't have any games and is not hooked up to the Internet. This is super-important! Prolificness comes not from magically locating some heretofore hidden source of willpower, but altering one's environment in ways that support one's ability to do one's work. (So willpower, as such, is irrelevant.) Some people are aghast when I mention disconnecting! But you not only can do it, you should. (Related)
This generally means having at least two PC's--one for offline work (e.g., writing) and one for online work, gaming, and other potential distractions. I know that not everyone can afford two, but for many applications (e.g., writing), a gently-used or low-end computer will be fine. And if you do have the funds, spending a few hundred dollars to liberate lots of your precious time and attention is a great investment.
Alternatively, you could work in a place without WiFi, or use a program like Freedom or AntiSocial to temporarily disable your connectivity. Since it's possible to cheat on both of those methods (by moving to a new location or rebooting), however, generally speaking they won't work as well as using a second, vanilla PC.
3) Physically separate yourself from distracting tech. It's not enough to shut off your phone while working: you need to leave it in another room.
4) Time your breaks. Datexx cube timers work well for this, or use any kitchen or other timer with a loud alarm.
5) Make your work and life happier and more interesting. Unhappiness and boredom will drive you toward ludic escapism. (Here's my free ebook on looking for a new job.)
6) Organize and automate your email and social media. Delete unnecessary contacts, shut off alerts, and create rules and filters so everything gets filed automatically. (The goal is to read it when you're ready, instead of having it constantly interrupt you.) If you're not a social media adept, don't struggle along trying to figure things out: pay or bribe an expert to help.
Do you have any other techniques for avoiding getting sucked into a ludic loop? If so, please leave them in the comments.