1. Practice mindfulness.
Focus on your breathing or your toes to be present
2. When you catch yourself, mentally label your distracting thoughts as "not useful" or "save for later"
3. Observe your emotions which may the be source of your distracting thoughts
4. Go for a walk or a run or some other exercise
5. How do you feel about the task at hand for which you are trying to avoid distraction?
6. Reexamine the purpose of the thing on which you are trying to focus.
7. Remember that your thoughts are not you. Commit to an action that will generate new thoughts.
8. Use the pomodoro technique and save the distracting thoughts for the break.
9. Write down your distracting thoughts, may be they will get out of your system.
10. Use a physical sensation to snap yourself out of distracting thoughts