I sit down, if possible in the circumstances, and begin paying attention to my breath.
I pay attention to it the same way I would pay attention to the tip of the paintbrush as I am painting.
I do this for several seconds or minutes at a time, until I'm able to achieve a calm state.
Sometimes I do it counting the breaths, which may work well with your attention specifics.
Remember that you are experiencing evolved behaviors and states which are being triggered in unproductive ways.
You can change these triggers by first dissipating their effects. This is what breath meditation did for me, over the course of several years.