Praise be to Allaah.
Undoubtedly your husband - according to what you say - has fallen into a great fitnah (trial, temptation), and there is the fear that if he persists in this he may give up prayer and the good things that he is now doing, because the fitnah of looking at haraam things may lead to bad consequences for the religious commitment and morals of the sinner.
Looking is the basis for all the problems that befall a man, because looking generates thoughts, then thoughts generate ideas, then ideas generate desires, then desires generate will, which develops into resolve, then the action is done, and it is inevitable if there is nothing to stop it. Hence it is said that patience in lowering one's gaze is easier than patience in bearing the pain of what comes after that.
Al-Jawaab al-Kaafi, p. 106.
We have already outlined in the answer to question no. 22917 the benefits of lowering one's gaze, which include the fact that lowering one's gaze is obedience to the command of Allaah and it purifies one's heart, soul and actions. It also prevents the poisoned arrow from having any effect, for a glance is one of the poisoned arrows of Iblees. And the one who lowers his gaze is compensated with the sweetness of faith in the heart. It frees the heart from being controlled by desires, because the real prisoner is the one who is controlled by his desires.
The answer to question no. 20229 lists some of the ways that help one to lower the gaze, such as: remembering that Allaah is always watching you, seeking the help of Allaah, beseeching Him and praying to Him, striving to control one's nafs and get used to lowering the gaze and being patient in doing so.
The answer to question no 23425 mentions some of the effects that sin has on the one who commits it. These include:
Deprivation of knowledge, deprivation of provision, the fear that the sinner may become alienated from his Lord and from people, his affairs may become difficult, the sinner may find darkness in his soul, he may be deprived of obedience - for sin leads to more of the same, and weakens a person's will to worship Allaah, and increases his will to commit sin; it gradually weakens his will to repent until the will to repent disappears from his heart completely. Then any feeling of abhorrence towards sin disappears from his heart and it becomes habitual for him, and he does not care if people see him or speak about him.
In the answer to question no. 33651 we have mentioned some of the ways of dealing with the fitnah of women.
One thing that upsets us is that your husband is one of those who have memorized the Qur'aan; what effect has the Qur'aan had on him?
We hope that he will read what we have said and the answers that we have referred to. May Allaah guide his heart and cause his physical faculties to do that which Allaah loves and is pleased with.
We would also like to say two more things to our brother:
1 - He should seek Allaah's help to obey Him and ask Him to help him get rid of this problem. Shaykh Muhammad al-Uthaymeen was asked about someone who had this problem and he replied:
This man who is suffering with this problem - we ask Allaah to guide him - is undoubtedly doing something haraam, for a glance is one of the arrows of Iblees - we seek refuge with Allaah. How often has a glance brought trouble to a person's heart and he has become a prisoner to it. How often has a glance affected a person's heart so much that he has become a prisoner of an image. Hence if a person is affected by this problem, he has to turn to Allaah and ask him to heal him of that. He has to turn away from it and not lift his gaze to any woman or any beardless youth. At the same time he has to seek the help of Allaah and turn to Him, and ask Him to keep him safe from this disease. Then it will be lifted from him, if Allaah wills.
Majmoo' Fataawa al-Shaykh Ibn Uthaymeen, 20/Shawwaal, no. 448.
Among the du'aa's that are appropriate in this situation is the following:
It was narrated that Shakl ibn Humayd said: I came to the Prophet (peace and blessings of Allaah be upon him) and said: O Prophet of Allaah, teach me a prayer for refuge with which I may seek refuge. He took my hand and said: Say: A'oodhu bika min sharri sam'i wa sharri baasri wa sharri lisaani wa sharri qalbi wa sharri maniyi (I seek refuge with You from the evil of my hearing, the evil of my sight, the evil of my tongue, the evil of my heart and the evil of my sexual desires),' until I had memorized it.
Narrated by al-Tirmidhi, 3492; al-Nasaa'i, 5444; Abu Dawood, 1551. classed as saheeh by al-Albaani in Saheeh Abi Dawood.
2 - He should realize that his life may end with his evil deeds. Allaah may take his soul when he is looking at something that Allaah has forbidden him to look at, so in what state will he be on the Day when Allaah raises people from their graves? How will he meet his Lord when his life ended in such a way?
We ask Allaah to set his affairs straight and to guide him.
He should also read the answer to question no. 33651.
You should also look at the answer to question no. 7669, which explains how a wife should deal with a husband who watches pornographic movies and does not give her her rights.
And Allaah knows best.