How can I repent from a sin so God would forgive me?
Allah the Almighty says,
“O you who have believed, repent to Allah with sincere repentance. Perhaps your Lord will remove from you your misdeeds and admit you into gardens beneath which rivers flow [on] the Day when Allah will not disgrace the Prophet and those who believed with him. Their light will proceed before them and on their right; they will say, "Our Lord, perfect for us our light and forgive us. Indeed, You are over all things competent" [Qur`an 66: 8].
Conditions of repentance
– Regretting having committed the sin;
– Desisting from it because it is an act of disobedience and not because it harms one’s body and property;
– Resolving not to return to it again.