Despite not being a father yet, I think I understand that aspect.
The thing is, I would also be thinking about how I put all that effort in, made personal sacrifices etc, all based on a lie, and all the potential that was lost. And at that point, I would be pretty close to too late to start over. I can't help but think there would be blind rage towards the mother.
It would not be about punishing the child, but I don't know if I could make myself rationalize it the way you describe.