It should be clear, on one hand, that repentance wipes out all sins, major or minor, as long as a person does not associate other partners in worship with Allah. Allah says in the Qur’an: “Say: ‘O My Servants who have transgressed against their souls! Despair not of the Mercy of Allah: for Allah forgives all sins: for He is Oft-Forgiving, Most Merciful'” (Az-Zumar: 53). Therefore, the gate to repentance is wide open for all people who committed sins, including adultery.
On the other hand, a Muslim husband or wife is not permitted to maintain the marital life with an adulterous spouse unless the latter sincerely repents and becomes a good Muslim.
Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada states: “Adultery is one of the most heinous of sins in Islam. No Muslim is permitted to cohabit with a spouse who has committed such a heinous sin. Allah says, “Vile women are for vile men, and vile men for vile women. Good women are for good men, and good men for good women; such are innocent of that which people say: For them is pardon and a bountiful provision.” (An-Nur: 26) Therefore, to cohabit with a person who is committing adultery is sinful. It is repugnant to one’s Islamic sense and sound nature.
If the adultery of a spouse is proven or there is a confession, the spouses must immediately separate their beds. However, divorce does not follow automatically. For divorce to take place, it must be pronounced or committed in writing.
If the wife has sincerely repented and the husband is convinced of it, then he is permitted to keep the marriage. However, if there is no sign of repentance, then it is not permitted for a Muslim to keep such a wife or a husband, as the case may be.”