Once again, planning is very effective here. Set aside time for answering emails, checking social media (business OR personal), responding to inquiries, etc. Outside these scheduled times, your use of technology should be strictly business, and clearly planned. Everything else should be out of reach and inaccessible.
If you’re on your computer, you should be doing work-specific things only. Turn off desktop notifications for emails, as well as notifications on your phone for everything. If you can’t bear do this, then at least silence your phone during your work time!