For those who find themselves entangled in the nets of a haram (prohibited) relationship, I share with them several steps for recovery, the effectiveness of which depends on their sincerity in wanting self-reformation, and on their persistence in applying them:
1 | Shielding your eyes
One who complains of being chastised by lust, yet does not restrain his glance, is analogous to a person who keeps windows open on a gusty day, yet complains of a draught.
Imam Ibn al-Qayyim said,
لَ يمكن أن يجتمع فى القلب حب الرحمن الِعلى وعشق الصور بل هما ضدان لَ يتلاقيان بل لَ بد أن يخرجأحدهما صاحبه
“It is not possible for the love of al-Rahman and lust for images to gather in one heart. They are opposites that cannot coexist. One will certainly evict the other.” 
He also said,
الصبر على غض البصر أيسر من الصبر على ألم ما بعده
“Patience towards lowering the gaze is easier than the consequences of not doing so.” 
2 | Marriage, if it is an option
The Prophet (ﷺ) said,
لم يُ ر للمُتحاب ينَ مِثلُ الن كا حِ
“There is nothing like marriage, for two who love one another.” 
The same fire that devastates nations is the same fire that heats your home and cooks your food. What’s the difference?
The first fire was uncontained, hence it destroyed, whereas the second fire was contained, hence it became a cause for life.
The same can be said about relationships and sex; when they break free from the limits of Sharia, they burn up livelihoods, peace of mind, and wellbeing, and burn you in the Hereafter, as well. When, however, that relationship is managed through the vessels of an Islamic marriage, you grow, become wholesome, and experience a pleasure that is perhaps only second place to the joy of knowing Allah and being a Muslim.
It is either an endeavour for marriage, or – if it proves impractical – then one is to end the relationship there and then. Do not give her your Islamic justification for your decision, do not give him farewells, but walk away, lock the door and throw away the key. With time, the pain of separation will ease, until one rediscovers himself, alone with the bigger picture of life.
Imam Ibn Taymiyyah advised a questioner – who had been struck by Shaytān’s arrows – in the following words,
إن البعد جفا ومتى قل الذكر ضعف الِثر في القلب
“Distance causes dryness, and so when remembrance of a matter reduces, its effects on the heart are reduced.” 
3 | Recalling the deficiencies of the beloved
One poet said,
لو فكر العاشق في منتهى **** حسن الذي يسبيه لم يسبه
“Had lovers thought about the reality of their beloved, they would not have fallen for them.” 
Whilst some do need genuine advice about their predicaments, others simply need to be told to get a grip.
Behind that filter from which she hides, and behind his façade of chivalry is, at the end of the day, a human who sneezes, belches, snores, urinates, menstruates, and vomits. S/he has terrible breath in the morning, bodily hair and odour, and all sorts of disgusting habits that have been meticulously obscured and Photoshopped during the courting phase, via the mask of obsession.
Imam Ibn Taymiyyah said:
قيل: العشق هو فساد الإدراك، والتخيل، والمعرفة; فإن العاشق يُخَيَّل له المعشوق على خلاف ما هو به
“It is said that lust is the corruption of perception, imagination, and knowledge, for the infatuated one imagines the beloved in ways that are contrary to his/ her reality.” 
4 | Recalling the perfection of what awaits believers in Paradise
As for the men, the Prophet (ﷺ) said:
إِنَّ الرَّجُلَ مِنْ أَهْلِ الْجَنَّةِ يُعْطَى قُوَّةَ مِائَةِ رَجُلٍ فِي الأَكْلِ وَالشُّرْبِ وَالشَّهْوَةِ وَالْجِمَاعِ
“Men in paradise are given the vitality of one hundred men with respect to eating, drinking, desire, and marital relations.” 
They are free from beards and bodily hair, with eyes lined with Kohl, and having taken the beautiful appearance of their father Adam (ʿalayhi al-Salām).
As for the women, the Prophet (ﷺ) said:
وَلَوْ أَنَّ امْرَأَةً مِنْ أَهْلِ الْجَنَّةِ اطَّلَعَتْ إِلَى أَهْلِ الْأَرْضِ لَأَضَاءَتْ مَا بَيْنَهُمَا وَلَمَلَأَتْهُ رِيحًا وَلَنَصِيفُهَا عَلَى رَأْسِهَا خَيْرٌ مِنْ الدُّنْيَا وَمَا فِيهَا
“If a woman from among the people of Paradise were to look out over the Earth, she would illuminate everything that is in between them, and would fill everything that is in between them with fragrance. And the scarf on her head is better than this world and everything in it.” 
5 | To be sure that those who make sacrifices are not left empty-handed
A promise that provides much needed strength, particularly to the young Muslim who may be struggling with specific addictions and private doings that he knows will distance him from Allah and success in the Hereafter:
Abu Qatāda and Abu al-Dahmā said,
أتينا على رجلٌ من أهلِ الباديةِ فقلنا هل سمعتَ من رسولِ اللهِ صلَّى اللهُ عليه وسلَّم شيئًا
“We approached a Bedouin man and asked him, ‘Have you heard any knowledge from the Prophet (ﷺ)?’
قال نعم سمعته يقولُ إنك لن تدعَ شيئ ا للهِ عزَّ وجلَّ إلَ أبدلك اللهُ به ما هو خي ر لك من ه
“He said, ‘Yes, I heard him say, ‘There isn’t anything which you leave for the sake of Allah, except that He will replace it with something better.’’” 
One man who experienced this promise was Prophet Yusuf (ʿalayhi al-Salām); had he acted upon his sin, the outcome would have been a short-lived moment of pleasure, followed by eternal guilt. Instead, he refrained, and the outcome was flipped around; a short-lived moment of restraint, followed by eternal praise in the book of Allah.
Furthermore, Yusuf (ʿalayhi al-Salām) was then rescued from prison, his name was cleared, he was given a position of authority in Egypt, and he was reunited with his loved ones.
Needless to say, you are no exception to the rule, for the One who gave Yusuf (ʿalayhi al-Salām) restraint is the same God who will give it to you, and the God who replaced for Yusuf (ʿalayhi al-Salām) with that which is better is the same God who promises to do the same for you.
6 | Busy yourself with a life and afterlife-defining activity
One poet said:
اتانى هواها قبل أن اعرف الهوى *** فصادف قلبا خاليا فتمكن
“My love of her came to me before I even knew what desire was. It met an empty heart and so it took hold.” 
A heart that is devoid of grand meanings and lofty objectives is a fertile ground for every Satanic whispering, wherein he varies his assaults between physical desires and religious doubts.
Some enquire about the shortage of prophetic narrations that deal with adolescents and hormonal youth, despite our religion being one that deals with every micro aspect of life.
The answer to this is the Prophet (ﷺ) managed the urges of this age group by entrusting to them huge responsibilities; Usāma Ibn Zayd led an army when he was seventeen, ‘Ali was given the role of head of intelligence, Mu’ādh was sent to Yemen to invite the people to Islam, whereas Mus’ab was sent to Madinah for a similar cause.
Hence, their youthful desire was managed by a sense of purpose that the Prophet (ﷺ) had activated within them, which prevented them from distractions or from being slowed down.
7 | My Superior has answers
Many will scream in anguish, saying,
“The entanglement is too much, and I simply don’t know how to navigate all of this.”
However, I know someone who does. Prophet Yusuf (ʿalayhi al-Salām) went to Him when seduction intensified, saying:
وَإِلََّ تَصْرِفْ عَ ن ى كَيْدَهُنَّ أَصْبُ إِلَيْهِنَّ وَأَكُن منَ ٱلْجََٰهِلِينَ
“.. and if You do not avert from me their plan, I might incline toward them and [thus] be of the ignorant.” 
The outcome did not disappoint:
ف ٱسْتَجَابَ لَهۥُ رَبُّهۥُ فَصَرَفَ عَنْهُ كَيْدَهُنَّ إِنَّهۥُ هُوَ ٱلسَّمِيعُ ٱلْعَلِيمُ
“So his Lord responded to him and protected him from their treachery. Indeed, He is the Hearing, the Knowing.” 
Human beings have a tendency to look for happiness in the places where it is easiest to search, rather than the places where it’s likely to be. When all is said and done, the ultimate remedy for lust is to find a way to the love of Allah. That is because attachment to people is injury, anguish, and a scorching heat, whereas the attachment to Allah is peace, inner expanse, and a cure.
Search for Him, and you will find a Lord who is not obsessed with your habits, but One who wants your heart. Give Him your heart, and He will change your habits.
 al-Jawāb al-Kāfi
 Ibn Mājah, on the authority of Ibn ‘Abbās
 Majmū’ al-Fatāwā
 From the poetry of al-Mutanabbi
 Qā’ida fī al-Mahabba by Ibn Taymiyyah
 Ahmad, Zayd Ibn Arqām
 al-Bukhāri, on the authority of Anas
 From the poetry of Dīk al-Jinn
 al-Qur’ān, 12:33
 al-Qur’ān, 12:34