Praise be to Allah, the Lord of the World; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
We pray to Allah, The Great and Almighty, to help you and us be steady on His right path, Islam. We also ask Him to help you increase your good deeds and avoid prohibitions.
Dear inquirer! Know that the best way to get rid of devilish insinuation and to be upright on His path can be achieved by:
(1) Seeking refuge with Allah, (2) asking Him for help, (3) following His Orders, (4) avoiding His Prohibitions, (5) keeping company with righteous girls, and (6) avoiding whatever arouses lusts.
For sure, accomplishment of the above-mentioned actions needs patience, exerting every effort, self-control and toleration. Then, by Allah's Favor, He will grant you guidance.
Allah Says (interpretation of meaning): {As for those who strive hard in Us (Our Cause), We will surely guide them to Our Paths (i.e. Allâh's Religion - Islâmic Monotheism). And verily, Allâh is with the Muhsinûn (good doers)."} [29:69]. He also Says: {While as for those who accept guidance, He increases their guidance, and bestows on them their piety.} [47:17].
May Allah bless you for your faithful desire and wish for better commitment to Islam.
For more details, please read our Fatwa:83183.
Allah knows best.