He said to his wife, “It’s over” and he does not know whether he intended then to divorce her or not
Question

                A problem happened between my wife and I. I said to her: “get out of the car and you will receive your divorce paper soon”. I am hesitant since this time, I say to myself that I will divorce her, then I say no I will not divorce her, I will give her another chance. At that time my wife was pregnant.  

Before she gave birth I went to the fatwa association in my country and told them what happened. They said that the divorce is not valid because I did not send her the paper of divorce. I decided then to let her stay in her family’s home until she gives birth as a punishment for her. I said to myself that I will bring her home and go again to the mufti. I told him about my problem again but added one more point this time , because I forgot it the first time I went, or maybe I just ignored it thinking it is unimportant due to my ignorance of the fiqh of divorce, that I said to my wife “ you will receive your divorce paper soon, and it is over” . 

The mufti said to me that it returns to my intention when I said this and that there are other matters I must make sure of. This confused me a lot. I do not know my intention. Was it just threatening, or I was angry and I meant something else? She has given birth now and I do not know what to do.
Praise be to Allah.
    Your saying to your wife, “Get out of the car and I will send 
    you your papers, and it’s over” may be regarded as a metaphor for divorce, 
    and it depends on your intention. If you meant to threaten her with divorce, 
    then divorce has not taken place until it happens, but if you intended to 
    divorce her by these words, then one divorce has taken place, and you have 
    the right to take her back during the ‘iddah. It is well known that the 
    ‘iddah of a pregnant woman lasts until she gives birth. If the ‘iddah ended 
    without you taking her back, then she cannot come back to you except with a 
    new marriage contract and a new mahr. 

    Some scholars are of the view that a metaphor for divorce 
    counts as a divorce regardless of intention, if he said those words during 
    an argument or at a moment of anger. 

    Ibn Qudaamah (may Allaah have mercy on him) said in 
    al-Mughni (7/306): As for that which is not clear, divorce does not take 
    place unless he intended it, or the circumstances indicate that. See: 
    Sharh Muntaha al-Iraadaat (3/87). 

    It says in Zaad al-Mustaqni’: Divorce does not take 
    place if a metaphor is used, unless he intended it, except in the case of an 
    argument or anger, or in answer to her question. End quote. 

    Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said in 
    his commentary: In these three cases, what is meant is that divorce by 
    metaphor counts as such regardless of intention: 

     an argument, i.e., with his wife, in which he says “go to 
    your family.” Divorce takes place even if he did not intend it, because we 
    have a situation which indicates that he wanted to leave her. 

    Or anger: i.e., in a moment of anger even if there was no 
    argument, such as if he told her to do something and she did not do it, so 
    he got angry and said “Go to your family.” Divorce takes place even if he 
    did not intend it. 

    Or in answer to her question, i.e., she said “Divorce me” and 
    he said, “Go to your family.” Divorce takes place…  

    But the correct view is that in the case of a metaphor, 
    divorce does not take place unless that is what he intended, even in these 
    cases, because a man may say “Get out” and the 
    like out of anger, with no intention of divorce at all. End quote from 
    al-Sharh al-Mumti’ (13/75). 

    Based on what the Shaykh (may Allaah have mercy on him) 
    regards as most likely to be correct, we say: If you did not intend divorce 
    by the words you said, then divorce did not take place. If you do not know 
    what your intention was, then the basic principle is that there was no 
    intention of divorce, so divorce did not take place in that case. 

    And Allaah knows best.