Never lose hope, oh Muslims!
“The wisdom of Allah, which is based on justice and grace, dictates that the one who repents from sin is like the one who did not sin.
Allah s.w.t. has guaranteed the one who repents from shirk, murder and zina that He will replace his bad deeds with good deeds. This is a general ruling that applies to everyone who repents from sin.
Allah s.w.t. says,
‘Say: O ‘Ibaadi (My slaves)
who have transgressed against themselves (by committing evil deeds and sins)!
Despair not of the Mercy of Allah, verily, Allah forgives all sins.
Truly, He is Oft‑Forgiving, Most Merciful.’
No sin is excluded from this general meaning, but this applies only to those who repent.
Al-Jawaab al-Kaafi, 1/116