Answer
In this counseling answer:
• Any thoughts of being with another man (even if she married a real husband), whilst undesirable, is not haram.
• She needs to seek some professional psychiatric help or ruqya.
• She needs to consider that her real spouse may not meet up to all the standards of her imaginary spouse.
As-Salamu ’Alaikum sister,
May Allah (swt) reward you for reaching out to help your friend. This is the sign of a good friend.
What she experiences can be OK if it is not a result of a more serious psychotic disorder or jinn possession and if it does not affect her daily life and interferes with her ability to find a real spouse.
For some people who go through the same thing in early adulthood, it is just a phase that will pass.
Even if she had a real relationship/marriage, she does not need to tell her new husband about her past. Spouses do not have to share this information about their past with each other as they start their new lives afresh with each other.
In your friend’s case, it is all in her mind anyway and not real, so there is even less need to share.
In Islam, we won’t be judged by thoughts in our head, but by our actual actions. Thus, any thoughts of being with another man (even if she married a real husband), whilst undesirable, is not haram. If she acts on them and commits zina with a real man, then, indeed, this is zina.
People develop imaginary people in their life for several reasons. If the imaginary person is not a result of some kind of psychosis, maybe she has invented him to fill in a gap in her life.
We know the importance of marriage in Islam. So, as a single woman, she might desire to get married and have certain needs fulfilled. Therefore, she has invented this person. She might feel like she is fulfilling this need of having a companion to share her life with. But it might also be her subconscious way of preparing for married life.
Seek Professional Help & Get Married
What to do next and how to assist her further depend on whether she really believes she got married.
If she truly believes that she is married to this imaginary person and believes that she can actually see him, then she possibly suffers from a form of psychosis. In this case, she would need to seek some professional psychiatric help.
In addition, you might want to help her find someone who is experienced in performing ruqya in the case she suffers from Jinn possession.
Check out this counseling video:
If she is aware that this person does not exist at all and she has just created in her mind to, for example, fill a missing gap in her life, then getting married to a man in real life could be the best solution. It will fill the gap she has been missing.
But, as you say, this imaginary husband has all the qualities of an ideal spouse, which might make it difficult for her to find a real spouse. So, she must know that her real spouse may not meet up to all the standards of her imaginary spouse.
She can overcome this problem by writing down the most important qualities of a spouse to her personally and focusing on them in particular when seeking a spouse.
In sha’ Allah, when she gets married, she will leave behind this phase of her life as she settles into a new life with her real husband.
May Allah (swt) bring her contentment in her future marriage and may He (swt) reward you for seeking help in assisting your friend.
Salam,
***
Disclaimer: The conceptualization and recommendations stated in this response are very general and purely based on the limited information provided in the question. In no event shall AboutIslam, its counselors oklr employees be held liable for any damages that may arise from your decision in the use of our services.