Please be assured of my prayers.
I would urge you to go to confession at once and to focus on your anger and your lack of control. In most states you could have gone to jail for your actions, physical violence is not okay.
It seems (and I could be wrong) that you are focusing more on your husband’s actions than your own. I am only judging by the information in your posts. I know you are upset but I am just making an observation, with all Christian charity it seems about 5% of what you write is about the assault and your remorse, and the other 95% is about your husband and how wrong he was and how wrong favoritism is.
A physical assault in a marriage is extremely dangerous and you need to seek help for your lack of control. Of course I agree with you that what your husband said was awful, and I guess I could affirm that repeatedly but what would that accomplish? Of course he said something awful, you wouldn’t have slapped him otherwise. My husband has said awful things for years during arguments and so have I and so has every married person on this forum. That is unfortunately the nature of sin and it’s impact on a marriage. You were in a heated argument and your spouse said something mean and nasty, unfortunately you took it to another level.
Of course your husband’s comments were serious and need to be addressed. However, I believe that the most serious issues need to be addressed FIRST. Therefore, go to confession, seek anger management and sincerely apologize to your spouse for the physical assault and vow to control your temper. Then, sit down calmly and try and focus on his favoritism and whatever other issues that are facing the two of you. Does your husband really favor one child? If so, then bring this up with a counselor or spiritual director. Does your husband have other mental health issues? If so then bring these issues up with his medical doctor or other professional.
Clearly this is a stressful situation. You love your children and you were so hurt by his words, I can only imagine it felt like a knife through you heart but your actions are not the way. If you don’t work hard to control your temper it could easily happen again. Please seek help for your family. God bless you.