You can't stay with a man who has had a love affair with another woman for two and a half years. You most definitely can't stay with a man who got said woman pregnant (don't worry too much, it could have been a STD, instead) and says, with no shame that he doesn't want to see the child.
You do realise that shithouses know that they are shithouses? Your husband saying that he doesn't want to see the child is his test for you. If you stay in this relationship on condition(it doesn't matter whther it's you or him that set the "condition") that he doesn't see his "outside" child, no matter your pain on discovering his affair (and child), you are as low as him. Trust me, he will use this against you.
Leave the man. Your child needs a father, but I am realising more and more that "fathers" tend to be "real men". Real men own their shit and do not look for the "loving helper" of a cheated upon partner to sort out the shitstorm that they have created. Your partner's actions (post discovery of affair) are those of a coward.
You don't need to be any "competition" with this other woman. She well may have had her motives, but if your husband hadn't put himself in her, she wouldn't have had a lot to be motivated by.
The most important consideration for you (after your daughter) is why you are even considering yoking yourself furthermore to somebody who is very capable of having a parallel life with the one he has with you. You are only living half a life if a partner is living a double life. THAT is always one of the truths that comes out of situations like this. Half a life for you and an enabled ,double or even (in some cases) triple life for the cheater. Do the right thing and don't enable your daughter to grow up and be a wimp when it comes to trifling men.
Sorry if I am being a bit harsh. Aside from shame and pride, I really cannot see why any sane woman would even consider not packing in a relationship such as this. Too much drama in too short a time with one too many women and one too many children not born of the official relationship is too much for you to take on. All the "martyr" women that I know have grown to have so much disdain for females in general and they "mansplain" more than any rogue male that I know in real life.