the Fatwa Department Research Committee - chaired by Sheikh `Abd al-Wahhâb al-Turayrî
It is not required for the man to have the intention in the heart that he actually wants a divorce to take place. However, there must be an intention to deliberately make this statement against one's own wife – even if the person is joking and does not really want the divorce to happen.
Intentionality of the statement is required. What is not required is the seriousness of the speaker. A man cannot go up to his wife and declare: "I hereby divorce you." and then turn around and say: "I was only joking." It is a contractual statement. Likewise, you cannot sign a contract with a company or a bank and then turn around and say "Ha! Ha! I was only joking when I signed that contract." This is the same thing.
This means that if the divorce is mentioned as an explicit, true, deliberate pronouncement, then it takes effect, whether or not the husband was joking or serious. Our Prophet (peace be upon him) said: “There are three matters that will be taken seriously whether they were meant seriously or in jest: marriage, divorce, and taking a divorced wife back before the divorce is finalized.” [Related by Abû Dâwûd and al-Tirmidhî who declared it a sound hadîth]
This does not include the following:
1. A statement made unconsciously, accidentally, or unintentionally (for instance, a slip of the tongue or an absentminded mumble like you describe in your question). This is because intentionality of pronouncement against one's wife – though not seriousness of heart – is required for the divorce to take effect.
2. A statement given in the context of a quote. If a scholar says to his students: "If a man says the words 'I divorce my wife' he brings about a divorce." – this does not mean that the scholar has divorced his wife. Likewise, someone reading this fatwâ out loud will not divorce his wife. The same can be said for a person giving testimony in court and quoting what he heard someone else say. The same would apply to an actor reading lines in a play. The reason for this is that whatever takes the ruling of a quotation is not a legal, contractual pronouncement. It does not bring about legal consequences.
Pronouncements of divorce are phrases connected with contractual clauses. A pronouncement of divorce is a contractual issue. Marriage is a contract. Divorce is a disillusion of a contract. It just does not happen accidentally or inadvertently. Intentions do not just spring into mind uncontrollably and against the person’s will. An intention is the deliberate and true motive that a person has for the action that he does. Just like buying, selling, and rental contracts, a divorce is something that only occurs deliberately.
Therefore, please stop worrying. Ignore your misgivings.
Source: Islam Today