It rarely happens, but in such cases I climb on my exercise bike and pedal with a continuous heart rate of 150 - 160 bpm.

and I find that after half an hour all the anger and frustration is gone.
running would work too, but my knees don't like it much when I do.