It could be understood from the verses of the Holy Qur’an and narrations of the Infallible Imams (a.s.) that a sinner, if before his death repents and is ashamed of his evil deeds, his sins are forgiven and wouldn’t be scrutinized for his deeds on the Day of Judgment.
Therefore, the door of repentance and return remains always open for all sinners and none should be hopeless of God’s blessing; but lest we think that whoever simply recites the phrase of: “O God forgive me (Astaghfirullah)” and through the pressure of nerves sheds a tear from his eyes, repents and would be blessed with forgiveness; instead, real repentance requires conditions that Imam Ali (a.s.) has pointed out. Imam Ali (a.s.) said: “There are six things necessary for repentance:
1. He must be really ashamed from the past sins.
2. He must seriously be determined that he would not commit sins in the future.
3. If people owe something upon you; you must pay them all of their dues.
4. The mandatory obligations not offered must be offered as make up (Qad’a).
5. The flesh that has been grown upon the body through utilization of illegitimate (har’am) food should be melted down completely through means of sorrow and grief about the committed sins.
6. As you have tasted the sweetness of sinning, should also tolerate the bitterness and hardship of worshipping, then you must recite the phrase of forgiveness: O God forgive me (Astaghfirullah).