I try to differentiate between deep and shallow, deep being more important. I try to get at least ome 3 hour block of "deep" done every day. Usually in the mornings.
Shallow stuff like social media and mails I do after eating or when I'm sleepy. I don't consider it a distraction, as it can be insanely valuable (and fun!) when done properly. That said, I use tools to enforce time limits.