Whenever you try to intervene in any kind of altercation you stand a chance of being attacked. When it’s a domestic dispute like this, there’s a possibility of being attacked by both people. Ask any cop or bouncer; domestic disputes are ugly and dangerous because you never know what the victim is going to do.
Never, ever get involved unless you’re prepared for instant violence. If it’s gotten to the point where the attacker is actually beating someone, he or she has already gotten past the posturing stage and will give absolutely no warning before turning on you. Same thing for the former beat-ee. Already primed for violence, there will be no hesitation if he or she decides to attack you.
I’ve gotten involved in a few violent situations for similar (stupid but morally sound) reasons. The first time, when I was still just a kid and had barely started my martial arts training, I almost got sucker-punched and probably would have ended up in the hospital if my dad hadn’t been watching my back. Another time, the guy attacked me with the knife he had out to threaten his victim, and only my training kept me from getting sliced all to hell and gone. I’ve also been threatened with a gun before. On one occasion, it was because I got in between my sister and one of her “boyfriends.” Yes, I was $^¢#ing lucky I didn’t get shot.
While I wouldn’t say never to do that again, you’re very lucky. You should have no lasting injury and what he did wasn’t life-threatening. Don’t do it again unless you’re better prepared for the consequences. By better prepared, I mean prepared to kill or die for what you think is right. I’ve risked my life before and would do it again, but I am fully cognizant of the risk I’m taking in doing so. I don’t think you were aware of the danger you were putting yourself in.
I also encourage you to pursue legal channels as far as you are willing to. Even if it turns out to be no significant charge for him, it does establish that he has assaulted someone and will count in the future if he attacks someone else.