First of all, it should be stressed that Muslim scholars agree — based on what has been revealed in the Qur’an and what has been authenticated in the Prophetic Sunnah — that homosexual behaviour (gayness and lesbianism) and sodomy are prohibited because they are assault on the humanity of a person, destruction of the family, and a clash with the aims of the Lawgiver, one of which is the establishment of sexual instincts between males and females so as to encourage the institution of marriage.
However, as a repenting Muslim who have committed those heinous sins, you should never lose hope of gaining Allah’s mercy. As you have indeed committed a major sin, you should repent very seriously and immediately. Rush to Allah and beseech Him to forgive you.
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)
Whatever sins one might have done are nothing compared to Allah’s encompassing mercy. The door to repentance is wide open, and Allah showers His sinful servants who turn penitent to Him, with His Forgiveness.
It is never too late for a true Muslim to repent to Allah, and to shed tears for the wrongdoing he has committed, keeping in mind that if one manages to escape the punishment of mortals, he will not for sure escape the punishment of Allah in the Hereafter. So, it is better to start a new leaf and let bygones be bygones. As long as you are sincere in your repentance, Allah Almighty will accept your repentance and forgive you your sins.
Elaborating on the importance of repentance and how it should be done, Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario , Canada , in this regard has stated that: “If you committed evil but have repented sincerely, and changed your life around for better, then Allah has certainly promised to grant you mercy and forgiveness. It is one of the basic principles of belief in Islam that Allah is All-Relenting, All-Forgiving and All-Merciful.
Here are a few verses which clearly convey this crucial concept:
“Do they not know that it is Allah Who accepts the repentance of His servants and receives (approves) their charity, and that Allah is the Relenting, the Compassionate?” (At-Tawbah: 104)
“Say: ‘O My servants who wronged against their souls, do not despair of Allah’s mercy! For Allah forgives all sins; for He is indeed Forgiving, Compassionate.’” (Az-Zumar: 53)
So do not put off repentance; take the necessary steps immediately, for no one can tell when the death will overtake us. The door of repentance is open so long as we are not in the throes of death, for the Prophet (peace and blessings be upon him) said, “Allah accepts the repentance of His servant so long as death has not reached his collar bone.” But since we have no way of knowing when death will overtake us, we must never be complacent or slack in hastening to taking steps towards repentance.
While speaking of repentance, I must rush to add, that it cannot be considered as valid unless one takes the following steps:
Firstly, one must feel deep remorse for the sins one has committed.
Secondly, one must refrain from it totally while also abstaining from all those leads or circumstances that led him to such a sin in the first place.
Thirdly, he must be firmly resolved never to sin again, and immediately becoming occupied in whatever good deeds that he can in order to wipe out his past sins.
Fourthly, all of the above involve sins involving the rights of Allah; if, however, your sins involve the rights of human beings, then you must also do whatever it takes to return or compensate or redress the grievances of the person you have wronged. Paying him his dues or compensating him in whatever ways possibly becomes an essential condition of valid repentance.
Repentance, as stated above once accomplished, will undoubtedly wipe out one’s sins, and guarantee him a clean record. The Prophet (peace and blessings be upon him) said, “One who has repented of a sin (sincerely) is like one who has never sinned at all.””
In conclusion, after sinning, one should not feel despair. Rather one should forward sincere repentance to Allah and rest assured that Allah Almighty will forgive his sin, as long as his repentance meets the abovementioned conditions of sincerity. Moreover, you must learn how to forget, for the more you look back to your old days of sinful habit, the wider the door is open for Satan to draw you back. Scholars used to resemble this case to that of gazelle being chased by hound. Despite that gazelle is naturally faster in speed, but its frequent looking back weakens its morale and makes it an easy prey for hounds.