Imam sheds light on the subject through his famous book "an exposition on Forty Hadith" as following:
Imagination is like a bird restless to fly, and sit on any tree it reaches.
This flight may bring about many great misfortunes. Fancy is one of the tools of the Devil, with which he enslaves man and renders him helpless. With the help of fancy, he entices men to committing villainies and indecencies.
A mujahid who is determined on self-rectification, and who has made up his mind to purify his inner self and banish satanic forces from there, should firmly hold the bridle of his imagination and let not it soar and wander about wherever it likes. He should try to prevent his mind from nursing corrupt and sinful thoughts, and always divert it to high and noble ideals.
In the beginning, it appears to be a little difficult, since Satan and his forces may glorify bad things in your eyes. But with little concentration and attention everything becomes easy.
It is possible that as an experiment you may just think for a while, and will not be able to concentrate upon an object. Whenever you see that your thoughts are stooping to lowly and mean things, turn your attention aside from them and think about the worthier and nobler things.
If you have been successful in your attempts, thank God Almighty for His help, and pursue these matters further. May God, out of His mercy, open the path of spiritual progress for you, and may you be invisibly guided in the straight path, Imam further explained.
May human deeds and right conduct be made easy for you. Be careful that vicious thoughts and vain fancies are induced by Satan, who wishes to fortify its forces in the domain of your inner self.
You, who are at war with Satan and his legions, and want to make the realm of your inner self a heavenly domain, are expected to be on guard against the guiles of the cursed villain. You should drive away those thoughts that counter Divine command.
God willing, you will be able to recapture this significant fortification from the unholy occupation of Satan and his allies, in this internal war. This fortification serves as a boundary (between good and evil). If you are victorious here you may hope for greater and nobler victories.
My dear friend, seek for God’s help at every moment. Pray and beg humbly in the court of your Lord.
O God Almighty! Satan is a great enemy, who has enticed your great friends and prophets.
O God! help this weak and entrapped servant of yours, and guard him against these vain ideas and these infirm thoughts that inflict me, so that he may succeed in his war against this strong enemy, who is threatening to destroy my felicity and humanity.
O God! please accompany Thy servant and guide him so that he may drive the Satan’s armies from Your seat, and may clip the hands of this usurper.
Read more articles:
Imam Khomeini warned of the world and love of the self