Meditate

A simple meditation you can do right now is just closing your eyes and paying attention to your breath. Tensing up your muscles and then relaxing them to start may help. When your mind wanders, just bring your attention back to your breath. Five or ten minutes of this will usually relax you, clear your mind, and leave you more ready for any mental task.