This is going to kill me to write this, but I don't feel like I have much choice.
I am one of those people who have an impulse to hit. I was spanked over every tiny little thing, I've got one sibling, 3 years younger, and I used to hit him to get my way, so it's deeply ingrained.
I also had severe PPD, and when my zoloft was still kicking in, I came extremely close to shaking my son, luckily I stopped (last second, but still before any damage could happen), put him down next to my husband and demanded he take over (he was asleep) and left the room until the crying restarted my mommy hormones, and I was absolutely certain that I did not want to harm him, only feed him. (cosleeping, middle of the night, he got frustrated because he couldn't find the nipple to latch, and would root while I was trying to get it in his mouth, so it was a cycle of frustration)
I do have myself under control, and I am extremely anti-spank. Anyone hits my child, that will be the last time they see them. But it's hard when you feel like you're the one most likely to do it.
One thing that helps me is to visualize a deflecting shield around DS, and tell myself to hit something else. I hit myself in the upper thigh alot, since I can't get a good swing that way, and can't cause myself any real damage. Kinda like a self-spank, just enough pain to remind me not to subject him to it. Also making a fist as hard as I can, causes my hand a tiny bit of pain, and again, reminds me this is not something I want to inflict on my child.
Unfortunately DS picked up hitting from another child I was watching (that stopped when an older sibling of that child took a swing at my pregnant stomach with a metal pipe) so now he gets frustrated and wants to hit. Luckily he understands that hitting makes hurties (he feels terrible afterward) and we are working on 'hit the pillow, hit the couch, people and pets are not for hitting.' It's working, slowly.
So if it is an impulse thing, it can be controlled. But he's got to want to control it, and he's got to be dead-set against causing his child pain before he can be trusted to follow through with it.