One of the reasons for people's detachment from the morality of the religion is that they consider themselves unforgivable out of the deep distress they feel because of the sins they have committed. Satan attempts repeatedly to instil such groundless thoughts in human beings. To one who has committed a sin, he stealthily whispers the message, "You are wicked and rebellious against Allah." If he has committed only a few sins, satan tempts him to sin still more. Towards his purpose, satan employs the feeling of embarrassment man feels towards Allah, but manipulates this feeling in order to draw man further distant from Allah.
However, like all others, this trick of satan's is a feeble one. The fact that someone committed a sin does not mean that he has been cursed by Allah, and that he will never be able to follow the straight path again. Not just one simple sin, but even if he were to commit the greatest sins, over and over again, he will always have the opportunity to repent and turn towards Allah. Allah informs us in the Qur'an that He will forgive each person who sincerely repents of his sins, that is, asks for forgiveness and remains firm in not committing the same sin again:
But if anyone repents after his wrongdoing and puts things right, Allah will turn towards him. Allah is Ever-Forgiving, Most Merciful. (Surat al-Ma'ida: 39)
Allah is infinite in mercy. In a verse of the Qur'an, He provides the good news to His servants, "...I am the Ever-Returning, the Most Merciful" (Surat al-Baqara: 160). Every individual has the opportunity to repent. Allah even accepted the repentance of some Jews, who went astray and worshipped an idol they made out of gold, after having believed in Him, and forgave them:
And when Moses said to his people, "My people, You wronged yourselves by adopting the Calf so turn towards your Maker and kill your own (guilty) selves. That is the best thing for you in your Maker's sight." And He (Allah) turned towards you. He is the Ever-Returning, the Most Merciful. (Surat al-Baqara: 54)
After repentance and asking for Allah's forgiveness, a person may well again become heedless, committing the same sin again. In fact, this may happen many times over. However, provided that that person repents once and for all, and is committed to not sin again, he may hope for Allah's mercy.
Nevertheless, as it is in every issue, the important factor is sincerity. An insincere action is unacceptable in Allah's sight. If one is not resolved to ending his sinning, and says, "I will repent eventually," he is clearly insincere, which is likely to bring sorrow to man. Allah warns those who hold such rationale as follows:
Allah only accepts the repentance of those who do evil in ignorance and then quickly make repentance after doing it. Allah turns towards such people. Allah is All-Knowing, All-Wise. There is no repentance for people who persist in doing evil until death comes to them and who then say, "Now I make repentance," nor for people who die unbeliever. We have prepared for them a painful punishment. (Surat an-Nisa': 17-18)