Ibn al-Qayyim (rahimahullāh) stated:
This is a disease of the heart that differs from every other disease in its nature, its causes, and its remedy. Once it enters the heart it dominates it. Even the doctors (i.e. therapists) are unable to provide a medicine for it. But the medication for this disease lies in knowing firstly that what you have been tested with conflicts with tawhīd.
Thus one should occupy himself with physical and spiritual acts of worship, which in turn would preoccupy him from constantly thinking about that woman. Make lots of du‘ā to Allah (The Most Perfect) that He turns your heart away from her and He returns it back to Him. Continue reading