As for the Book, Allah, Glorified is He, says:
“O Prophet, why do you prohibit what Allah has made lawful for you, seeking to please your wives? And Allah is All-Forgiving, Most Merciful. Allah has already ordained for you a way to release yourselves from your oaths. Allah is your Protector, and He is the All-Knowing, All-Wise.”
The evidence lies in Allah’s words: “Allah has already ordained for you a way to release yourselves from your oaths.” This is a general text establishing that Allah has prescribed a means of release from every oath Muslims swear. He, Glorified is He, addresses the community in the plural after first addressing the Prophet, peace and blessings be upon him, in the singular, knowing that the community swears many different kinds of oaths. If even one oath were posited for which there was no means of release, that would contradict the verse. How could that be, when not a single case has been excluded from this general text by either a scriptural text or consensus? Indeed, its generality extends to its underlying rationale as well as its wording: an oath is a bond that bars the legally accountable person from acting, so prescribing a means of release from this bond is fitting because of the relief and latitude it affords. This consideration applies even more strongly to oaths invoking manumission or divorce than to other oaths involving vows made in obstinacy and anger.
For if a man swears by divorce that he will kill someone, sever his ties of kinship, or withhold something obligatory upon him, such as returning something entrusted to him, then by invoking divorce in his oath he makes it a greater obstacle to doing good, being mindful of Allah, and reconciling people than invoking Allah in his oath would be. If he then fulfils his oath, he incurs worldly and religious harm that Muslims unanimously agree it is forbidden to bring upon oneself. If, instead, he divorces his wife, divorce too entails obvious religious and worldly harm.
As for religious harm, the entire Muslim community agrees that divorce is disapproved of when relations between the spouses are sound: