Source:Tree of Askeron by Mattias Hammar
Naturally when we find ourselves committing a sin over and over again, we begin to lose hope. We feel as though our sins are too great and that Allah will never forgive us. The doubts that fill our mind are a product of Shaitan. Shaitan does his best to convice us that we are not good enough for Allah. He tells us that we are are too hypocritical to stop the sin, let alone get on our knees and ask Allah for His forgiveness. This way of thinking is completely wrong as the hadith explains. Allah is our Creator, He is the Most Merciful and despite our sins, whatever they maybe (except shirk) He will forgive us.Repentence is the key to forgiveness. If we never repent to Allah, how else will we gain His forgiveness? Allah gives us time to repent. From the time that we realize that what we have done is sinful to the time of our death, we can always repent. We must not wait too long though, because only Allah knows when we will die. The concept of forgiveness is repeated many times throughout the Quran.
"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." [al-Zumar 39:53]
Abu Umamah (may Allah be pleased with him) narrated the Messenger of Allah (salallahu alayhi wa salim) said, "The companion (Angel) on the left lifts his pen for six hours for the Muslim slave that errs or sins. If this slave repents and seeks Allah's forgiveness for that error or sin, the Angel doesn't record it. And if the slave doesn't ask Allah for forgiveness, the Angel records it once.
How Merciful is our Lord? He doesn't even give the Angels permission to write down our sins until we have had time to repent. Even if we fail to repent, He still gives us time to ask for our sins to be erased.