He thought of divorcing his wife
Divorce does not happen just because you said that to yourself or you thought about it, or decided to do it but did not utter the words.
That is because the Prophet (peace and blessings of Allaah be upon him) said: “Allaah will forgive my ummah for whatever crosses their minds and whatever they think of, so long as they do not act upon it or speak it out loud.” Narrated by al-Bukhaari, 6664; Muslim, 127.
Ibn Qudaamah said: What that means is that divorce can only take place if the words are spoken out loud. If a man intends that in his heart but does not utter the words, then divorce does not take place, according to the majority of scholars, including ‘Ata’, Jaabir ibn Zayd, Sa’eed ibn Jubayr, Yahya ibn Abi Katheer, al-Shaafa’i, and Ishaaq. This was also narrated from al-Qaasim, Saalim, al-Hasan and al-Shu’bi.
From your words, “I did not say it in a loud voice. I could hardly hear myself saying it” we understand that you did utter these words, but in a soft voice. If that is the case, then what you said is regarded as meaning that you did divorce her, subject to the condition, which is that she washes the clothes. But you said that you did not intend to divorce her, only to scare her. Based on this, the ruling on this divorce is that of a vow (yameen): if she washes your clothes then you have to offer kafaarat yameen (expiation for breaking a vow), and that is not a divorce, as mentioned in the fatwa by Shaykh Ibn Baaz and Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on them). See Fataawa Islamiyyah, 3/280-285.
Kafaarat yameen is mentioned in the verse in which Allaah says (interpretation of the meaning):
“Allaah will not punish you for what is unintentional in your oaths, but He will punish you for your deliberate oaths; for its expiation (a deliberate oath) feed ten Masaakeen (poor persons), on a scale of the average of that with which you feed your own families, or clothe them or manumit a slave. But whosoever cannot afford (that), then he should fast for three days. That is the expiation for the oaths when you have sworn”
See also question no. 9985.
All of this is based on the assumption that you spoke these words out loud, and that you were not just thinking of the matter.
It is better and more on the safe side if you offer kafaarat yameen.
To sum up the answer:
If you did not actually utter the words of divorce, and you did not move your tongue, then you do not have to do anything.
But if you uttered these words, even in a low voice, this comes under the ruling of a vow (yameen), because you meant to stop her washing your clothes, not to divorce her.
Whether your wife knows what happened or not, that does not alter the ruling at all.
The Muslim should avoid the matter of divorce, whether in thinking, determining to do it or speaking the words out loud, because that exposes the Muslim family to destruction for trivial reasons.
We ask Allaah to set the Muslims’ affairs straight.
And Allaah knows best.