Wael `Abdel-Mut`aal Shihab, Shari`ah researcher at Al-Azhar University, states: In fact, this topic can be approached from following points:
1. The relation between predestination and committing sins
2. Repentance and not forgetting one’s sins
Regarding the first point, it should be clear that predestination signifies that Allah Almighty knows what took place in the past, what is taking place in the present, and what will take place in the future. Allah’s knowledge doesn’t force His servant to sin or to obey. But, Allah knows what His servant will do, and He Almighty gives people the freedom to obey or to disobey, and on this freedom of choice He calls them to account.

As for the second point, a sincere repentance requires: 1) regretting one’s sins, 2) stopping doing that sin, 3) resolving not to do that sin again, and 4) returning back people’s rights if the sin involves taking people’s right illegally.
When a Muslim maintains sincere repentance, meets the above conditions, ask Allah for forgiveness, change his lifestyle, do good deeds, and avoids the prohibitions, then he should be assured that Allah Almighty will accept his repentance. Allah says, “Say: ‘O my Servants who have transgressed against their souls! Despair not of the Mercy of Allah: for Allah forgives all sins: for He is Oft-Forgiving, Most Merciful.” (Az-Zumar: 53) He Almighty also says: “Allah accepts the repentance of those who do evil in ignorance and repent soon afterwards; to them will Allah turn in mercy: For Allah is full of knowledge and wisdom.” (An-Nisaa’: 17)
Finally, after sinning, one should not feel despair. He should lead a life full of hope and piety. He should try to look forward, with full hope in the overflowing mercy of Allah, and rest assured that as long as he is true with Allah, He will be very kind with him, for surely He is full of love, especially to His penitent servants. Your friend should try to forget his past sins, start a new leaf, and let bygone by bygone. What he needs after repenting is to go on doing as much as of good deeds, bringing himself closer to Allah, and steering clear of the prohibitions.