It should be understood that when a woman asks her husband for a divorce, that does not always mean that she is serious about ending her marriage to him or that she no longer cares for him; rather it may be a moment of sudden anger in which she says something but does not really mean it. Or she may be going through difficult circumstances that made her say this. Hence you should not be hasty in this matter and you should try to remedy the problem in a suitable and wise manner.
But if the matter was as you describe, that she has started to get to know another man and is in contact with him, then this is serious and the cause of this calamity, especially if that person is a kaafir whom it is not permissible for her to marry even if she did not have a husband, so how about if she is the wife of a Muslim?
In the light of what we understand from your question, which is that before this the woman was sincere in her Islam, what we advise you to do is to be patient for a while regarding the matter of divorce, so long as you do not allow her to continue being in touch with that man who she has got to know or with any other men. Rather you should try using gentleness and kindness with her, and try to draw close and to be friendly towards her, not only with the aim of keeping her as your wife, but for the sake of something that is more important than that, namely keeping her as a Muslim, because there is the fear that she may turn back on her heels and apostatise from her religion if you allow her to have her own way and leave her to do whatever she wants.
So try by all possible means to prevent her from travelling as she wants. Try to speak kindly to her and remind her of the life that you have together, and of the blessing of Islam that Allah has bestowed upon her; and remind her that it is not permissible for her to marry a non-Muslim man if you do divorce her, so how could she form a relationship with him when she is still married to you?
If you can perform ruqya for her yourself, or you can find someone who can do that, because of what you think of the possibility that she has been affected by the Shaytaan, then do that, because perhaps it is as you think; then perhaps Allah will heal her from this calamity.
When you have done all that you are able to and have tried by all available means to set her straight, then if she responds and you see that she wants to repent from what she has done and adhere to her religion, then keep her as your wife and strive to teach her about the religion and help her to adhere to its rulings.
But if you find that she is persisting in what she is doing and exhortation has not worked with her and you cannot find any way to bring her back to her house and make her obedient to you, then divorce her and leave her to what she has chosen for herself. If you want to keep her and refuse to give her a divorce (talaaq), and she resorts to khula, there is nothing wrong with what you have done, because she is wronging herself and her husband and is being defiantly disobedient; in fact she is seeking that which is damaging to her religious and worldly interests.
And Allah knows best.
Reproduced from Islam QA