All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
If your wife committed all the misdeeds that you have described, then she has indeed violated the Islamic Sharia in many ways. She had an illegitimate relationship with another man, she left the marital home without a valid reason, and she married that man while she is still married to you. She thus neglected the rights of Allah, The Exalted, and then the rights of her husband over her. She must sincerely repent to Allah of her sins. Please refer to fatwa 86527 regarding the conditions of repentance. She must fulfill all the conditions of sincere repentance; her regret or asking you to forgive her is not enough.
Her marriage to that man is invalid, without any doubt. One of the religious impediments to marriage is the woman's marriage to another man. Allah, The Exalted, says (what means): {And [also prohibited to you are all] married women...} [Quran 4:24] This means that it is prohibited to marry a woman who is already married. Hence, her marriage to that man is invalid, and it has no effect on your marriage to her; she is still your wife. If she is truthful in her repentance to Allah and her conduct changed to the better, then keep her and treat her kindly and do not tell anyone what she did. Please refer to fatwa 301411.
It seems that you were rather lax with your wife. So we advice you to be more strict with her and oblige her to observe the hijab and avoid mixing with non-Mahram (alien) men or being alone with one of them as well as similar things that might lead her to temptation. You should also teach her the matters of the religion, nurture belief in Allah in her heart, and be a good example for her in all this.
As for the pregnancy, the basic principle is that the child is attributed to you as long as your wife got pregnant while being married to you. Please refer to fatwa 84301.
Some scholars held that it is permissible for the husband to have intercourse with his wife who had committed Zina (adultery) without first confirming whether she is pregnant from Zina or not. Shaykh Ibn ‘Uthaymeen wrote, “...Rather, the reported opinion of Abu Bakr and a group of the Companions, may Allah be pleased with them, is that the woman who commits Zina is not required to observe an ‘Iddah (waiting period) or wait to find out whether she is pregnant or not, especially if she is married, because the Prophet, sallallahu ‘alayhi wa sallam, said, 'The child is attributed to the bed (i.e. to the husband).’”
Allah knows best.