Were you hit as a child? Everyone has the urge. I'm not a hitter (have been sorely tempted) but more of a naggy, moany old cow of a mum (and tips on that gratefully received).
My mum was beaten by her mum, and in turn ahe decided that she wouldn't hit it - she did a few times though! I think its now very diluted in me, so I wouldn't hit a child. Sa my MIL says - if you slap a small child for being cheeky, what do you do when he's 13 and sneaks a cigarette, kill him?
Resolve that you won't smack your child. Try not to do things when rushed - being short of time with a dawdling child is a recipe for stress!
Find what relaxes you and make sure you do this every day - long bath, good book, knitting, pins in a voodoo doll... Learn how to 'let go'. Count to twenty, recite the last 10 prime ministers, name all your childhood pets...
Your little one will forget this one incident if you allow. Don't keep reminding him, or it will become 'the tinme mummy beat me with a baseball bat (children can inflate any incident). You have apologised, so he knows it is naughty to hit.
Don't be hard on yourself. It was a blip. You know that this isn't 'you'.