This is a very hard one and something I worry about a lot. I was actually planning to make a post about it. Maybe I still will. I have always promised myself that if dh ever hit one of our kids our marriage would be over and I'd be pushing for supervised access only.
You don't hit children. Ever. My job as a mum is to protect my children and to keep them safe from physical harm at the least. Those are my principles.
But then reality isn't always that neat, is it and who are those principles really benefitting? Is it really in the best interest of my children to break up the family and put them through all the chaos and heart break that causes, to lose their father (who is at all other times a good, kind and very dedicated father just as I assume the op probably is) because of a one-off mistake just so I can say I was true to my principles? And getting even more realistic he probably would not lose access bexsuse of a one off slap so they would still have to see him anyway just that I wouldn't even be around to protect them?
And what if it was me who lost my temper? If I was in OP's position. I have never hit my children or even wanted to but you never know what you will do when you are truly pushed. You can never say never. Would it be in the best interest of my children to take myself out of the picture? I am pretty sure it wouldn't be.
Op, this is the position you find yourself in and the problem is honestly, now that it has happened, there really is no good and fair solution. Neither to you, nor to your family and definitely not your childen. You have to understand the gravity of what you have done. And you have to understand that this must never ever happen again. Stop rmakinf excuses for it. Don't have a cup of tea and tell yourself you were pushed to the limit. Do not feel sorry for yourself. I can see you are already rationalising what you have done saying he is never good for you and saying that now he is already again laughing and playing (and so the slap didn't affect him at all). You have to understand that this situation must not happen again.
I can only suggest you do what everyone else has suggested, ie take a good hard look at yourself and make sure that you have got coping mechanisms in place that will mean this will never ever happen again. I like the idea that someone suggested of having at least ten strategies to fall back on to calm yourself. And apologise to your child. And promise him this will never ever happen again. You owe him that. You are his mum. Your job is to keep him safe.
If it was my family, op, I'd leave you. Maybe I shouldn't fool myself that it's for the kids but I just couldn't live with someone who physically assaulted my child.
Having said all that I do wish you and your family the best and I feel very sorry that you are in this position.