I'm sorry you've found yourself in this situation. You were an unwitting OW and have no reason to feel guilty, which I think will be helpful in the longer term. It's always easier to deal with emotionally difficult situations if you know you've behaved well yourself.
I'd break down the problem into separate issues, dealing first and foremost with the pregnancy. Do you want to keep it? Bear in mind that you'll have no control over your Xs involvement or lack of it, regardless of what you do. As such, and given the unreliability and weakness of character that he's already shown, you need to make the decision about continuing/terminating based on being a single mother with no support, including no financial support (since although he should pay child support that doesn't actually mean you'll end up with any in your pocket, or an amount that makes a real difference). All that said, pregnancy/termination is a decision that often needs to be made with the heart, rather than the head. Whatever decision you make is the right one.
Once you've decided on that, your decision will be partly made for you already about telling the wife. If you choose to have a termination, look only to your own life, which will be far happier IMO if you choose to go no contact and leave this man completely in the past. The best revenge is a life well lived and all that.
If you choose to keep the baby, the right thing to do would be to inform the father, but it should be him you inform, not his wife. You have no relationship with her - no obligation to protect nor reason to hurt. Even though many women would want to know, many others will simply view you as an evil fantasist. Finding out about her H's affair will be better coming from anyone other than you. If your X chooses to be involved with the baby if you keep it, he will have to tell her himself eventually. If he chooses to ignore you, you and baby will probably have had a lucky escape.
Best of luck with everything. 