A simple way to accomplish this is to manage the notification settings on your smartphone.
Try turning off personal email notifications. Unless social media is part of your job, consider turning off notifications from apps like Facebook, Instagram, and Twitter during work hours. Designate a specific time during your day to check personal communications.
MORE IDEAS FROM THE ARTICLE
To master time, master your ‘internal triggers.’
Try to understand the uncomfortable sensations you're trying to escape when you reach for your cell phone or email account, then learn new techniques for managing that discomfort in a healthier manner.
Many people use to-do lists without considering the amount of time it takes to complete a task.
Practice "timeboxing" your schedule: assigning a maximum amount of time for an activity. It can help give context and limits to ambiguous tasks.
Use 'pact' like a way to pre-commit to an outcome when you know you're likely to get distracted.
This could be as simple as working with a friend for a set period of time where you keep each other accountable.
To enter flow, you need appropriated self-control, environmental conditions, skills, task and rewards. Besides that, you must know what you’re doing, be able to see whether or not you’re doing it well, and be pushing yourself outside of your comfort zone.
The last point is especially important, it's mastery combined with challenge that brings flow. Too much challenge and we get overcome with anxiety. Not enough, and our brain loses focus and looks for other stimuli.