Coping mechanisms

I’ve posted in here once before about my son hitting his little sister. It has gotten to a point now where we can’t let her walk around the house if our son is near. As soon as he sees her, he immediately goes towards her and tries to hit her. He thinks it’s funny, even when we try our best to explain to him that it is wrong, give him time outs, etc… he even thinks our reaction is funny. Tonight he attempted it over and over when I got home from work and each time I stopped him I tried being calm, but once he broke through my defenses and finally connected with one of his hits on her, I immediately went to rage and yelled at him loudly, pulling him away from her. I don’t want to get to that level because he cannot help it, does not mean it because he thinks it’s a game, and I don’t want to do anything that will make him scared of me. So, in the moment, what do you parents do when your child does something similar to calm yourself down before completely losing it?