Really, one of the most tragic and consequential sins in which man engages is adultery. This heinous crime destroys families, lives and destroys within some people the hope of attaining Allah’s pleasure. But in Islam, the door of repentance is always open, only that the repentance itself demands a resolve to cease from a sinful activity. A person who has engaged himself in an adulterous relationship must resolve to cease from the sinful sexual activity and return to Allah, seeking His forgiveness. Allah will surely turn unto him and shower him with His mercy.

This indicates one who committed this sin should never lose hope of gaining Allah’s mercy. As he has indeed committed a major sin, he should repent very seriously and immediately. He has to rush to Allah and beseech Him to forgive his sins.
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) “Allah accepts the repentance of those who do evil in ignorance and repent soon afterwards; to them will Allah turn in mercy: For Allah is full of knowledge and wisdom.” (An-Nisa’: 17)
Moreover, the Glorious Qur’an gives glad tiding to penitent people who having committed sin such as Zina regretted their sins, determined not to do them once more, and performed righteous deeds that Allah will replace their sins with Hasanat (rewards). Allah says, “(And true servants of Allah are)those who cry not unto any other god along with Allah, nor take the life which Allah hath forbidden save in (course of) justice, nor commit adultery and whoso doeth this shall pay the penalty; the doom will be doubled for him on the Day of Resurrection, and he will abide therein disdained for ever; save him who repenteth and believeth and doth righteous work; as for such, Allah will change their evil deeds to good deeds. Allah is ever Forgiving, Merciful. And, whosoever repenteth and doeth good, he verily repenteth toward Allah with true repentance.” (Al-Furqan: 68-71)