If you did not utter the divorce and the oath, then you do not have to do anything, because thinking to oneself is forgiven, and divorce does not take place if there is only the intention; similarly, an oath is not binding if it was only an intention, rather it must be spoken or something that takes the place thereof such as writing it. Al-Bukhaari (5269) and Muslim (127) narrated from Abu Hurayrah (may Allaah be pleased with him) that the Prophet (blessings and peace of Allaah be upon him) said: “Allaah has forgiven my ummah for whatever crosses their mind so long as they do not speak of it or act upon it.” Qataadah said: if he issues a divorce in his mind, it does not count as anything.
We have mentioned in a previous answer that the divorce of a person who is affected by whispers from the shaytaan does not count as anything even if he utters it, according to some of the scholars, so long as he did not intend divorce. Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said: The divorce issued by one who is suffering from whispers from the shaytaan does not count as such even if he utters it with his tongue, if it was not done intentionally, because this utterance happened as the result of the waswasah without there being any intention or will on his part; rather he was forced to do it because of the strength of the impulse and weakness of resistance. The Prophet (blessings and peace of Allaah be upon him) said: “There is no divorce in the case of compulsion.” So no divorce has taken place if he did not really intend it with certainty. This is something that may be forced upon him with no intention or choice on his part, so it does not count as a divorce. End quote from Fataawa Islamiyyah (3/277).
To sum up: nothing is binding upon you, whether it be a divorce or expiation for breaking an oath, but you should deal with the whispers from the shaytaan by remembering Allaah a great deal, doing righteous deeds, and turning away from the whispers and not paying any attention to them.
And Allaah knows best.