I've had a similar situation. A close friend went through a divorce, and his son (who was nine when the divorce happened) turned into an absolute bastard jackass motherfucking jerk. I don't typically talk that way of kids, but this kid was just an asshole. I understand that he went through something pretty awful and life changing, but he was also making no effort, and both his mother and father (I stayed friends with both) tried so hard to help him. He was in therapy, his parents were remarkably civil and good to one another throughout the process and after, and he just didn't try. I know 9 and 10 year olds have to grieve and they act out, but this kid was using it as an excuse to act like a jackass.
So one day (he was ten at this point) he is being his usual typical self, bullying my youngest (who is substantially smaller than him), and saying pretty inappropriate things to my older girls. Then he intentionally slammed a door into my second youngest's face, and it connected hard enough to give my son a bloody nose. I have fucking had it with this kid. I took him by the arm, now gently or politely, but I essentially carried him at a rapid walk by his arm. It was uncomfortable, but it didn't hurt him much. He was shit scared because no one ever treated him like this. I firmly sat him down on a bench that's by our front door. Firmly. I told him if he got up from that bench he would never be welcome in our home again. I told him he was responsible for the way he acted, and I told him he was acting like a jerk. I told him people who act like jerks on purpose can't be at our house or every play with our kids.
Now, apparently coming to our house is a life highlight for this kid. He nearly shit his pants at that point. He sat quietly on that bench for an hour and a half, and then his dad took him home. The next time he was over, he was a bastard again, and I told him he was not welcome for six months at our house, and none of our kids will be calling him or spending any time with him. Six months later, he is an absolute angel at our house.
Why the hell can't parents create rules and follow through on threats? This would make such a difference for so many kids. I know my friends are feeling like they fucked their kids over with the divorce, so they don't want to be stern, or too mean, or whatever. They want to be the fun parent who hangs out with their kids. It's not helping anyone. I got lucky, and imposing massive repercussions on this kid has worked in this situation. His dad was pretty pissed with me for a while (he spends quite a bit of time here, usually with his kid), but his mom thought this was awesome.
Anyway, super wordy post to say that sometimes you have to lay down the law and follow through. I would never slap a ten year old, but I fully understand and support your reasoning for it.