Okay, when my son was little... around 3 this used to help me. Not sure how to word this where it makes sense and doesn't sound horrible, but I'm going to try...
My friend and I had 3 yr olds, she a girl, me a boy, and we pal'd around quite a bit. Somedays would be so stressful, trying to fix dinner, or run errands with the kids bickering around us, demanding we fix whatever.l I swear they had an argument over water once. Her little girl screaming, "Aaron said water, make him stop!!" And my little boy giggling, "Water!"
When it got to be too much, rather than blowing our tops we'd mutter...
"That's it. I'm done" "yea... me too"
"Can't handle it no more" "yea... me neither"
"Have to hide the bodies." "Yea.... gotta hide the evidence"
"Hmmm.. we'll bury them! "Yea, that's perfect"
"How we gonna do that? Got a shovel?" "Nope, do you?" "Nope"
"Gonna have to buy a shovel. Who's going to the store?" "Not me. How bout you?"
"Nope, too tired, have to finish dinner, kids need to eat"
"Hmm... maybe next time"
By the time we were done talking this nonsense out, we'd calmed down, and were giggling at the absurdity of it. At no point in time were we ever serious. We'd never hurt our children.
This worked just as well when I was alone.
I've since moved on, various other threats have been: lock him in the closet, string him up by his toes, make him clean the bathroom with a toothbrush. All said out of frustration, in an overly dramatic tone, where he could see I was getting overwrought, and would giggle and go on.
I have never seriously meant any of the above, and this is what has worked for me, as a bit of silliness goes a long ways to lightening my mood, and calming the situation.
Whatever silliness works for you, a word game of similiar sorts to take your mind off the current problem, and remind you that it really isn't that bad and not worth all that anger and frustration, may help.
Find something that helps you to step back, and remember, whatever it is, it really isn't that big a deal, and take a deep breath.