Wa `alaykum as-salamu wa rahmatullahi wa barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Dear brother, thank you for trusting us and for your question.
Though you have committed a great sin (kabirah), it is good of you to repent and be back to the straight path of Islam. So, you have to take the necessary steps of repentance with a strong and sincere intention not to do that again.
In his response to your question, Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states,
You need to repent and ask forgiveness of Allah. Repentance, in order to be valid, must fulfill the following conditions:
1- feeling deep remorse,
2- refraining from it totally, while keeping away from all the leads and avenues that lead to it; and resolving firmly not go back to it, and finally,
3- doing as many good deeds as you can to expiate for the same.
Once you do this, you can hope to receive the forgiveness of Allah.
For further details, I would cite here from one of my earlier answers:
“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 9: 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 39: 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 widely 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.” (At-Tirmidhi) 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 possible 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.” (Ibn Majah)
Allah Almighty knows best.