1) Devices or people
For both of these, "blocking" is the way to go For people of course this should be more of a request.
2) Other things racing in your mind.
Generally the result of your not tracking all your open loops effectively, the solution is just to jot down in your notebook or task management system whatever the open loop you're thinking about is/needs done about it. It is absolutely key you review this list often enough that you truly trust it.
3) The task itself
In the words of David Allen, author of the life management system Getting Things Done ™, "you're more productive when you're relaxed." In so far as it is the task itself that is distracting you, relaxing and looking at it objectively is a massive help. If needed, take just a second to compare it to a circumstance like being in a war just to make you realise you're actually pretty well off right now and what you're facing isn't so scary.
- What kinds of tasks do you consider deep work? And how long do you dedicate to them?
- Do you play music while doing deep work?
- How do you re-focus on your deep work when you realize you have become distracted?
- What are the bigger distractions for you: interior ones like your thoughts or feelings, or exterior, like noises, other people, etc? Which are more challenging for you?
- How can you be less stressed while doing homework?
- Do you set a time limit for deep work or do you just go with the flow?
- How do you work from home?
- How can I have a better focus for deep work?
- How do I stay more consistent with my deep work or any other habit?
- What makes you work for the whole day? (Over eight hours constantly in the deep mindset)