Here are some practical steps to control your gaze:
1- First, let us agree upon an issue that greatly affects the way you control your gaze, namely, the issue of the relativity of beauty.
The criteria of beauty vary from one person to another and from one sensibility to another. For example, you may like certain clothes and consider them the most attractive. On the other hand, other people may see these clothes as not beautiful enough, or even ugly.
Hence, what you see as beautiful may not be so in others’ eyes; or rather, it may not be beautiful at all.
Let me give you an example to make this issue clearer; the drug addict believes that drugs are the best thing in this world. However, you know the reality of drugs and thus it is impossible for you to say that drugs may be good just because there are some people who believe that they are so.
Hence, the prohibited scenes that you see and believe to be beautiful, like many others, are not so in reality; what is the beauty in a woman who angers Allah The Exalted publicly and defies His Commandments openly?
Where is the beauty in a scene that many other people have enjoyed before you and many others will enjoy after you?
Where is the beauty in a woman who offers herself as a tradable commodity through showing her beauty to entice buyers?
What beauty is this when, in reality, it is the work of the devil?
The Prophet described the woman who leaves her house while applying perfume and showing her adornment saying: “The woman is ‘Awrah (part of the body that must be concealed). Whenever she leaves her home, the Devil beautifies her in men’s eyes.” [Al-Albani: Saheeh]
Is the woman who is beautified by Satan himself in your eyes and the eyes of many other men considered beautiful, no matter what the reality of her appearance may be?
You should know the reality of what you see in order to disdain it and dissuade yourself from looking at it.
2- Controlling the eye and its movement:
Some people – particularly those who are not habituated to lowering their gaze – let their eyes lead them instead of leading their eyes. Such people let their eyes wander all over without any form of control. However, you can solve this problem by training yourself to look at a certain place for a period of time and gradually lengthening the duration until you reach the level of controlling your eyes and preventing them from looking at anything without necessity.
3- If you lose control over your gaze once, then follow this look immediately with an act of worship such as asking Allah The Almighty for forgiveness one hundred times or making Tasbeeh (saying "Subhan-Allah") one hundred times, or offering charity. This method is one of most successful therapies, because you defy the devil through it and make him regret making you commit that sin, as you follow it up with repentance and additional good deeds.
4- Penalize yourself by some beneficial action that has a positive outcome if you lose control over your gaze once. For example, give a certain sum in charity, preferably a substantial amount, to serve as sufficient deterrent.
5- Determine a target for yourself and pledge to achieve it. For example, try to lower your gaze for two days or one week. If you achieve this purpose, then reward yourself with something pleasant even if it is something small. You can eat one of your favorite meals for instance. After that, double this period and double the reward.
6- Always tell yourself that you have a dignified soul and it does not befit you to pay attention to these lowly matters, as honorable souls only accept the best things that lead to the best results. On the other hand, the lowly souls hover about lowly things and land over them like flies which gather around rubbish. Hence, the honorable soul does not accept injustice, immorality, theft or treachery, because it is too sublime to do this. [Ibn Al-Qayyim in Al-Fawa’id]
Furthermore, giving full rein to one’s gaze is not among the characteristics of magnanimous men.
The pre-Islamic poet, ‘Antarah Al-‘Absi, said in one of his poems that he lowers his gaze if his female neighbor appears, until she enters her house. If this was the attitude of a poet in pre-Islamic times, then young Muslim men have even greater reason to do the same.
To conclude, let us go over the following anecdote that happened to one of my friends. We will see how his realization of the triviality of this issue in addition to his self-respect, after the support of Allah The Almighty, caused him to control his gaze.
Shortly after becoming more committed to his religion, my friend went with his father to Britain.
We kept warning him strongly against the West, and we asked Allah The Almighty to support him in the face of the temptations there. In our opinion, this young man was about to go through a very difficult test, especially as he was an adolescent.
Indeed, my friend was accompanied on his travels by his brothers’ sincere supplications and great concern about his religiousness. When he arrived in Britain, he was extremely scared, because he found himself face to face with sights he was not used to and he feared that his feet might slip and forsake chastity.
However, he conducted the following interesting dialogue with himself:
Do you want to look at some flesh? Ok then, let us go to the butcher and buy some meat to look at! The result is the same in both cases, and their fate is similar: both of them end in nothing.
Indeed, my friend found that this inner-dialogue was very effective and whenever he thought about looking at the women who expose their adornment, he repeated the same dialogue.
Thanks to Allah The Almighty, he returned home with his chastity and piety intact.
Hence, you should think about the petty nature of the sin and realize that it does not deserve the consequent suffering.
7- Seek the help of Allah The Almighty, supplicate as much as you can, and ask Allah The Almighty to provide you with adherence to chastity and to protect your eyes from looking at what is prohibited. Do not ever feel ashamed of asking Allah The Almighty to help you control your gaze.