All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is no doubt that these words of insult that you uttered are obscene but they do not necessarily lead to apostasy, but they are forbidden.
'Abdullah Ibn Mas'ood narrated that the Prophet said: "Reviling a Muslim is fusooq (disobedience) and fighting him is (tantamount to) disbelief." [Al-Bukhari and Muslim]
'Abdullah Ibn Mas'ood also narrated that the Prophet said: "A believer is neither a slanderer nor a curser, nor is he obscene or vulgar.” [At-Tirmithi]
Therefore, you must repent to Allah from that, and the conditions of repentance are highlighted in Fatwa 86527.
The most important thing that would help you not to return to such a thing in the future is to restrain yourself when you are angry, as this moment is often leads to misconduct. It is for this reason that the Prophet warned us against anger and clarified to us how to treat it. For more benefit on this issue, please refer to Fataawa 88764, 86681 and 124465.
We advise you to be wise whenever problems arise in your marital life or when there is a disagreement or dispute. Each spouse should fulfil the rights of the other. Allah Says (what means): {And due to the wives is similar to what is expected of them, according to what is reasonable. But the men have a degree over them [in responsibility and authority]. And Allah is Exalted in Might and Wise.} [Quran 2:228]
Allah knows best.