Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states: “If you have been guilty of a sin and Allah has covered for you, then don’t uncover the veil that Allah has placed over your sin. Rather ask forgiveness of Him and repent to Him sincerely, for He is, above all, all-Compassionate, All-Merciful, All-Forgiving. Allah says, “I am most assuredly Most Forgiving to those who repent, cherish faith and do good works.” (Ta-ha: 82)
It is wrong to say that sin of adultery is expiated and forgiven only if the person were stoned to death or given hundred lashes. In fact, such punishments are extreme measures that can only be applied in extremely rare cases; they are exceptions that require stringent measures to execute. Moreover, they are simply not applicable in non-Muslim countries or societies where such laws are not enforced.
You must therefore take it to your heart that Allah’s forgiveness is not at all conditional on submitting yourself to such punishments. You can surely expect Allah’s forgiveness if you are willing to take the necessary steps towards true and sincere repentance: Among these steps are: Feeling deep remorse for your sin, refraining from the sin as well as from all the leads and circumstances that led you to the same in the first place and resolving firmly in your mind never to do it again. Finally such a determination should be followed by whatever good works you can do to expiate for your sin.
Allah says, “Verily good deeds wipe out bad deeds.” (Hud: 114). The Prophet (peace and blessings be upon him) said, “Allah does not wash out bad deeds through bad deeds; rather He washes bad deeds only through good deeds.”
So repent sincerely and get yourself occupied with good works to the best of your ability. Once you have followed these steps your sin is blotted out. The Prophet (peace and blessings be upon him) said, “A person who has repented (sincerely) is like one who has never sinned.”