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 in Sharee’ah, divorce is in the hands of the husband and not in the hands of the wife, so if a wife utters the word divorce or has the intention of divorce, then this is of no effect except if the husband had given her the choice to this effect [to divorce herself] or that he authorized her to do so.
As regards the saying of a husband to his wife “you are not my wife’, or his saying ‘you want a divorce, right? Ok, done I am leaving’, then these expressions are not clear words of divorce but they are metaphors of divorce, so divorce does not take place unless the husband intended it; for more benefit, please refer to Fatwa 92649.
Similarly, his saying ‘if you want a divorce, I will give it to you’, then this does not lead to divorce because it is a mere promise of divorce. However, if he intended divorce on the spot, then divorce takes place because this is a metaphor of divorce; for more benefit, please refer to Fataawa 89065 and 106429.
Therefore, if the situation is as you mentioned in the question that your husband did not intend to initiate divorce, then your marriage is still valid.
It should be mentioned that the spouses should avoid as much as possible causing problems and they should be keen on mutual understanding over the issues that may arise between them, and each one should respect the other, while fulfilling each other’s rights as best as possible.
For more benefit, please refer to Fataawa 85308 and 83157.
Allaah Knows best.