All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
First of all, you should know that marital life is rarely free from problems between the spouses, so it is important to be wise when these problems occur and both spouses should avoid angry reactions.
In your situation, you should not have pointed to your husband's mistake in front of his daughter and you should have avoided speaking back when he was angry. Rather, you should have drawn his attention to his mistake at another suitable time. Therefore, you should abide by this in the future and this should be known to both of you.
It seems that you said to your husband the word “shut up” in a humiliating manner while raising your voice over him; indeed, it is not appropriate for you as a pious wife to do so. Also, your husband was wrong firstly by hitting you, and secondly by slapping you in the face as this is forbidden in itself. Hakeem Ibn Mu’aawiyah Al-Qushayri narrated from his father who said: “I said: “O Prophet of Allaah, what is the right of one’s wife over him?” He said: “You should feed her when you feed yourself, you should clothe her when you clothe yourself and you should not hit her in the face, nor rebuke (bad-mouth) her, nor desert her (refuse to share the bed with her) except at home." [Abu Daawood]
Moreover, your husband should not have threatened you with divorce as this is contrary to keeping good marital relationship with the wife.
Finally, we advise both of you to be patient and to endeavor to keep the family atmosphere suitable for the good nurturing of your daughter as she needs to see her parents as an example of good manners.
Allaah Knows best.