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, sallallaahu`alayhi wa sallam, is His slave and Messenger.
It is better for you to ask a scholar orally to clarify the truth of what you really did. On the one hand, some people may have doubts about the matter with regard to what causes apostasy, so he thinks that he has apostatized, whereas it is not the case. On the other hand, some people are obsessive about faith, and whispers overpower them, so he utters Kufr without choice and intent, so he is not assigned for religious obligations because he is excused.
In general, we can say that the majority of jurists are of the opinion that apostasy before consummation annuls the marriage immediately, and that there is no way for the husband to his wife if he repents and returns to Islam, contrary to the choice of Ibn Taymiyyah as he believes that he may take her back if she has not been married to someone else.
Nonetheless, some scholars have favored the permissibility of taking a license when needed in order to ward off hardship.
Allah knows best.