Slightly different situation, but this is what happened to a friend of mine.
Her H got friendly with OW, left his wife suddenly. Denied OW anything to do with it, but ended up with her. Almost exactly 12 months later, OW ended their relationship whilst pregnant as he was sleeping with his wife behind OW's back !
The wife took him back, accepted the child, and now loves the child and thinks of it as part of the family.
All of her friends think she is a bloody saint and said that there is no way that we could have done that.
Every person is different. She loves her husband, and she just wanted her family back together, even if that meant with an extra child. So far they seem happy, probably 4-5 years on now
Only YOU can know if you will be able to deal with this long term, and if you can accept the child. Personally I don't think that I could, but I know that when it is YOUR reality, it is hard.
It is very easy for people to post on here and tell you what to do, but they don't have your emotions and feelings. I swore I would never take my XH back if he had an affair, yet when he did, all I could think about was keeping the family together for the DC. Shame he didn't.