Is Conditional Divorce Valid?
Question

What is the ruling on one who swears that his wife will be divorced if she does something such as severing the ties of kinship, and the husband is in a state of extreme anger at that point, and he is not in control of himself, to such an extent that he does not remember what he said?
Praise be to Allah.Muslims should not take divorce lightly
A man should not use divorce every time there is an argument between him and his wife, because of the negative consequences that result from divorce. Many men take the matter of divorce lightly and every time there is an argument between them and their wives, they swear to divorce them, and every time they have a disagreement with their friends, they swear to divorce their wives, and so on. This is a kind of toying with the Book of Allah, because the Messenger of Allah (peace and blessings of Allah be upon him) regarded the one who divorced his wife three times in one go as toying with the Book of Allah. So how about one who makes divorce his habit, and every time he wants to stop his wife doing something or urge her to do something he swears that he will divorce her? 
An-Nasa’i (may Allah have mercy on him) narrated that Mahmud ibn Labid (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) was told about a man who divorced his wife three times in one go. He got up angrily and said: “Will the Book of Allah be toyed with when I am still among you?”  A man stood up and said: “O Messenger of Allah, shall I kill him?”  
Al-Hafidh (may Allah have mercy on him) said: “The men of its chain of narrators are trustworthy.” It was classed as authentic by Al-Albani in Ghayat Al-Maram (261). 
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said: “These foolish men whose tongues utter the words of divorce for every issue, great or small, are going against the teachings of the Prophet (peace and blessings of Allah be upon him) who said: “Whoever wants to swear an oath, let him swear by Allah or else remain silent.” (Narrated by Al-Bukhari, 2679) If the believer wants to swear an oath, let him swear by Allah, may He be glorified and exalted. It is also not right to swear a great deal, because Allah says (interpretation of the meaning): 
“And protect your oaths (i.e. do not swear much).” [Al-Ma’idah 5:89]
One of the interpretations of this verse is that it means: do not swear a great deal. 
But if they swear an oath of divorce, such as saying, “I will divorce you if you do such and such,” or “I will divorce you if you do not do such and such,” or “If you do such and such my wife will be divorced,” or “If you do not do such and such my wife will be divorced,” and other such phrases, these go against the teachings of the Prophet (peace and blessings of Allah be upon him).” (Fatawa Al-Mar’ah Al-Muslimah, 2/753)
Is conditional divorce valid?
When a man says to his wife, “If you do such and such then you are divorced,” or, “If you do not so such and such then you are divorced,” this is a conditional divorce . The majority of jurists are of the view that this divorce counts as such when the condition mentioned is fulfilled. 
Some of the scholars – and this was the view favoured by Shaykh Al-Islam Ibn Taymiyah (may Allah have mercy on him) and others – were of the view that this condition is subject to further discussion, and it depends on the intention of the one who said it. 
If he meant what is intended by the oath, which is to encourage someone to do something, or to stop someone from doing something, or to affirm something or deny something, then it comes under the ruling on oaths and no divorce takes place, but he must offer the expiation for breaking an oath when it is broken. 
If he intended thereby to divorce his wife, then she is divorced when the condition is fulfilled. His intention is known only to Allah from Whom no secret is hidden. So the Muslim should beware of trying to deceive his Lord and of deceiving himself. 
The Standing Committee was asked about a man who said to his wife: “Come with me or you are divorced,” and she did not go with him. Does that count as a divorce? 
They replied: 
“If you did not intend that as a divorce and you only wanted to urge her to go with you, then that does not count as a divorce, but you have to offer the expiation for breaking an oath according to the more correct scholarly view. If you intended that to count as a divorce if she did not respond to you, then that counts as one divorce.” (Fatawa Al-Lajnah Ad-Da’imah, 20/86) 
Is divorce in anger valid?
It should be noted that most cases of divorce occur at moments of anger , stress and agitation, not when one is feeling happy and relaxed. If a husband divorces his wife at a time of anger, that does not mean that the divorce does not count, as many people think, except if the anger reaches such an extent that the man loses his reason and is not aware of what he is saying, in which case it does not count as a divorce according to scholarly consensus. 
But if it has not reached such an extent that he loses his reason, but the anger is so intense that the man is no longer in control of himself, then the majority of scholars are of the view that this anger does not mean that the divorce does not count. 
Some scholars are of the view that it does mean that the divorce does not count. This was the ruling issued by Shaykh Al-Islam Ibn Taymiyah (may Allah have mercy on him) and his student Ibn Al-Qayyim (may Allah have mercy on him), and it is the correct view in sha Allah. See the discussion on that in question no. 45174 . We have only referred to the view of the majority so that the questioner and readers may understand the seriousness of uttering the word of divorce, at times of anger and at other times. It may lead to the breakup of his family and to harm for himself and his family because of his haste and his unruly tongue. We ask Allah to keep us safe and sound. 
If the oath that he swore concerning his wife happened when his anger had reached such an extent, then it does not count as a divorce, in sha Allah.
And Allah knows best.