He found out that his wife was having a relationship with a man, then she repented. Should he divorce her?
Question

I am from a conservative family, Allah has blessed me by *marrying a righteous woman from a religious family. My wife’s father is active in da’wah and a social reformer. All his sons and daughters have fully or partially memorized the Quran.
The problem: my wife has changed a lot recently, and I have discovered that she has a relationship with some person. Was initially just through the telephone, then they met several times. Since I knew about this relationship, she is unwell in bed, regretful, and in a very bad state. She swore by Allah to me while we are in the sacred mosque that it was just talking and that she did not commit adultery with him. She also said that she wanted to leave him but he threatened her. She is very regretful now. The reasons behind what she did were:
1- I do not talk a lot to my wife, and I do not fulfill her emotionally by praising her or other things.
2- I was recently looking for a home for my family which made me busy.
3- I allowed her to continuously visit some of her relatives who are bad women affected her and they were who dragged her to this dirty lake.
4- I committed some great sins before and after marriage, and I think this is my punishment from Allah (the sins I committed were adultery and much much greater sins).
5- My wife’s mood has been abnormal most of the time lately; she feels things she hasn’t before. Now I testify in front of Allah that I have repented for my sins. And as for my wife, she is in pain and regretful, she does not believe what she did, knowing that we have children.
The question: 
What shall I do now?
1- Shall I divorce her although I am sure she repented? Can her repentance be accepted?
2- Shall I keep her with our children (the secret of my pain), or leave her and exchange her by another wife?
3- Shall I forgive her and supplicate to Allah to cool my heart of the sadness and the grief?
4- If I do that will be considered one of who the prophet (PBUH) described as dayouth (shameless)?
Our home is breaking down. All due to our sins. But I testify in front of Allah that I repented as well as she did.
Praise be to Allah.Firstly: 
We congratulate you both for repenting from the sins that you committed, which is by the grace of Allaah to you both. Allaah calls all His believing slaves to repent, as He says (interpretation of the meaning): 
“And all of you beg Allaah to forgive you all, O believers, that you may be successful”
[al-Noor 24:31]. 
You should realize that Allaah rejoices at the repentance of His slave. The Prophet (peace and blessings of Allaah be upon him) said: “Allaah rejoices more over the repentance of His slave when he repents to Him than one of you who was on his mount in the wilderness, then he lost it, and his food and drink are on it, and he despairs of finding it. He goes to a tree and lies down in its shade, having lost hope of finding his mount, and whilst he is like that, there it is standing in front of him, so he takes hold of its reins and says, because of his intense joy, ‘O Allaah, You are my slave and I am Your lord,’ making this mistake because of his intense joy.” Narrated by al-Bukhaari (5950) and Muslim (2747).  
You should realize that Allaah has promised to turn bad deeds into good deeds. Allaah says (interpretation of the meaning):  
“Except those who repent and believe (in Islamic Monotheism), and do righteous deeds; for those, Allaah will change their sins into good deeds, and Allaah is Oft‑Forgiving, Most Merciful”
[al-Furqaan 25:68-70]
But this depends on the repentance being sincere. The conditions thereof are:
 1.Giving up the sin
2.Regretting what one has done
3.Resolving not to go back to it.
Secondly: 
Undoubtedly what your wife did is a bad thing, but now she has repented from it, so we hope that because of her repentance she will go back to the way she was before, or become even better.
We cannot be certain that it is better for you to stay with her, but we say to you: 
If you think that her repentance is sincere, and that she deeply regrets what she did, and that she has changed for the better, and her sin will not had any negative effect such as making you doubt her and hate her, then what we think is that you should keep her, so as to maintain her repentance and protect your children from being lost. 
We hope that her case is like this, and that you will keep her in kindness, and that what she has done will not affect you, especially since you say that you also committed sins and immoral actions before Allaah enabled you to repent.  
Undoubtedly your falling short with regard to her rights played a major role in your wife’s turning against you and falling into sin, even though it does not justify what she did. You have to watch yourself and fulfil the rights that Allaah has enjoined you to give to your wife and children. 
One of her rights over you is that you should help her to repent sincerely and guide her towards good and warn her against evil. It is not permissible for you to allow her to visit those who play a role in corrupting her and leading her astray, even if they are the closest of people to you. You are a shepherd and the head of your household, and Allaah will ask you about your flock and whether you neglected them or did the duties that Allaah enjoined upon you. 
What we think is that you should conceal her sin and appreciate her repentance and stay with her. It is not diyaathah (cuckoldry) to keep her after she has repented, rather diyaathah is keeping her when she has not repented and is persisting in having haraam relationships, which is what we hope she has repented from sincerely. 
And Allaah knows best.