Imam in this regard has undertaken very serious and useful discussions in his famous book "the combat with the self" as following:
Person struggling against his own self should constantly concentrate upon his intentions. If any time the idea of violating divine commands occurs to him, he should know that this idea has been instilled into his mind by Satan and his allies, who want to deter him from his good resolution.
He ought to curse them, seek God's compassionate protection, and banish those evil ideas from the realm of his heart. He should reply to Satan that this day also he has to abide by the condition imposed upon his own self that he will not go against God's commands. Thus with the help of God, Satan will be driven away.
One must remain in this same state of mind until night ‑ the time for self-examination and evaluation of his deeds of the whole day. This is the time to see whether he has been honest to his Creator.
If he has been faithful to God, he should be thankful to Him. Such a person has gone a step forward in His direction and became an object of His attention. God will thus continue to help him in performing all worldly and religious duties, and will diminish his pains of struggle in the next day.
And if he repeats this exercise many times, he will be accustomed to acts of piety and the eradication of evil traits, the late founder of the Islamic Republic further explained.
He will observe that it does not require overly cumbersome efforts and obedience to God will give him abundant spiritual pleasure. God forbid, if there are any lapses on his part, he must ask God's forgiveness, and sincerely implore Him that he will be more careful in future.
The Merciful God will throw open the doors of grace and compassion to him, and will guide him to the straight path.
Read more: