Praise be to Allah.
What the man is doing of having a haraam (an unlawful) relationship with a woman who is not his mahram is a betrayal of the rights of Allah before it is a betrayal of the rights of his wife. The Muslim is bound by a covenant with his Lord, may He be exalted, and what he is required to do is to fulfil that covenant and not break it. Moreover, this is not what the individual is enjoined to do in response to the blessings that his Lord has bestowed upon him. Allah, may He be glorified, has blessed him with good health, well-being and a wife and children, either now or soon, in sha Allah. The way to show gratitude for these blessings is not to waste this good health and well-being in haraam relationships with non-mahram women, and the way to show gratitude for the blessing of the wife and children is not by neglecting them and breaking ties with them. Allah, may He be exalted, has promised to those who give thanks increased blessings and He warns those who are ungrateful for blessings of a severe punishment, as He says (interpretation of the meaning):
“And (remember) when your Lord proclaimed: If you give thanks (by accepting Faith and worshipping none but Allah), I will give you more (of My Blessings), but if you are thankless (i.e. disbelievers), verily! My Punishment is indeed severe”
What appears to be the case in your situation with your husband is that you have a place in his heart; were it not for that he would have hastened to end the marital relationship between you after he found out that you are aware of his haraam relationship with that woman. This is something that should be used to put pressure on him to give up this sin and end that haraam relationship. We think that you should treat him very kindly and do not fall short in treating him kindly; you should also adorn yourself for him, wear your best clothes and create a pleasant atmosphere for him in the house, because he may be missing that altogether or in part. You should also advise him and admonish him, and warn him against continuing to commit haraam actions. You should explain to him what his punishment will be with Allah in the Hereafter, or in the Hereafter and this world; indeed you should warn him that Allah may punish him for such sin with regard to his family, as he may be tested with marriage to a woman, or with having a daughter, who does with men what he is doing with women – what will his reaction be in that case?
We advise you not to let many people know about what your husband is doing, because the basic principle is to conceal sins that are unknown. What we want is that which will help mend his ways, not that which may be taken as a means to continue what he is doing of committing sin.
Fill his time with useful and beneficial things, and do not leave him time when he is alone with his shaytaan! His daily schedule should be full, either with acts of worship such as upholding ties of kinship or attending Islamic study circles, or he should be busy with worldly matters that are beneficial and permissible, such as exercise.
Offer a lot of du‘aa (supplication) for him to be guided and set straight, for the best weapon of the believer is du‘aa’. Strive hard to offer du‘aa’ in the last third of the night and when prostrating.
Finally, if what is mentioned above does not succeed in putting a stop to that haraam relationship of his with that woman, then you have two options:
(i) you can advise him to marry her in accordance with the laws of Allah, may He be exalted, so as to save him and her from this haraam relationship, on condition that his relationship with her has not reached the level of zina (adultery) – Allah forbid – because it is not permissible to advise someone to do something that is haraam, as their getting married will not be permissible until after they repent (from zina).
(ii) Or you can ask for a divorce (talaaq), but start by threatening to ask for it, then if he remains as he is you have the right to seek a way out of the calamity you are faced with by asking for a divorce. The final resort in medical treatment is cautery, as it is said, and despite the pain of this cautery (divorce), it will give you a way out from the distress and anger you are feeling, and it will protect you and your children from the possibility of fitnah (tribulation) because of your husband’s misbehaviour and his haraam relationship, whether that protection has to do with your religious commitment, honour or health.
This is what we can give you by way of advice. May Allah guide your husband and set his affairs straight; we ask Allah to reconcile between you when he is adhering to righteousness and obedience towards Allah.
And Allah knows best.