I've had this issue yrs ago too. My parents spanked, hit, paddled etc & I started to understand why when I was getting angry over a situation.
I had to explain it to my husband that I didn't wanto carry on this "tradition." So when I get angry I try to find him & say "switch" which means I need him to jump in & I need out!
If I'm alone I bite the inside if my cheek & walk onto the back porch to catch my breath. I know I need a break. I need to remove myself.
It's helped a great deal. I don't feel that urge or that split second snap to smack. I just remove myself....even into the bathroom for a minute or 2.
I hope you find something that helps you.