All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Allaah informed us in His Book about Himself and the Prophet also informed us in his Sunnah that Allaah forgives all sins no matter how great they are if the person repents and returns to His Lord, and that Allaah softens a hard heart and guides with His Mercy and Favour the one who has gone astray.
The following are some verses in this regard:
Allaah Says (what means): {Has the time not come for those who have believed that their hearts should become humbly submissive at the remembrance of Allaah and what has come down of the truth? And let them not be like those who were given the Scripture before, and a long period passed over them, so their hearts hardened; and many of them are defiantly disobedient. Know that Allaah gives life to the earth after its lifelessness.}[Quran 57:16-17] Ibn Katheer said about the interpretation of the above verse: {Know that Allaah gives life to the earth after its lifelessness.}; "This is an indication that Allaah turns a hard heart into a soft one and guides the misguided and makes a way out of difficulties. It is He Who stirs a barren land into life. Similarly, He guides hard hearts with the evidence of the Quran and enlightens them after they were sealed, so all Glory be to Him Who guides whomever He wills."
Allaah Says (what means): {And those who do not invoke with Allaah another deity or kill the soul which Allaah has forbidden [to be killed], except by right, and do not commit unlawful sexual intercourse. And whoever should do that will meet a penalty. Multiplied for him is the punishment on the Day of Resurrection, and he will abide therein humiliated. Except for those who repent, believe and do righteous work.}[Quran 25:68-70]
Allaah further Says (what means): {Say, "O My servants who have transgressed against themselves [by sinning] do not despair of the mercy of Allaah. Indeed, Allaah forgives all sins. Truly, it is He who is the Oft-Forgiving, Most-Merciful.}[Quran 39:53] Another verse reads: {And whoever does a wrong or wrongs himself but then seeks forgiveness of Allaah will find Allaah Forgiving and Merciful.} [Quran 4:110] Allaah also Says (what means): {And it is He who accepts repentance from His servants and pardons misdeeds and He knows what you do.}[Quran 42:25]
As regards the Prophetic Hadeeth in this regard, it is as follows:
The Prophet said: "Allaah, the Exalted, has said: "O son of Aadam! I will forgive you as long as you supplicate to Me and hope for My forgiveness, regardless of the sins you have committed. O son of Aadam! Even if your sins reach the height of the heaven, I would forgive you if you ask for my forgiveness. O son of Aadam! If you come to Me with the earth full of sins, and meet Me associating nothing to Me, I would match it with the earth full of forgiveness." [At-Tirmithi]
There are many verses and Ahadeeth in this regard. Anyway, if a person sincerely repents to Allaah, then Allaah is Oft-Forgiving, Most Merciful, He will accept his repentance no matter how great his sins are. In addition to this, when a person repents to Allaah, this is evidence that Allaah did not seal his heart and that there is still something good in it.
Finally, it should be noted that a Muslim should not despair from the Mercy of Allaah, as this is one of the great major sins. How many non-Muslim persons who were in deep disbelief and misguidance but when they repented (by accepting Islam), Allaah accepted their repentance; and a Muslim comes in priority in having his repentance accepted by Allaah, Allaah willing.
Allaah Knows best.