If I've been separated from my wife for 4 months and now she is pregnant by another man, what rights/obligations do I have?
Since you are still married and your wife is pregnant, she could potentially file for divorce and ask the court to order you to pay temporary support as the 'presumptive father.' However, your defense to her request would be that you are not the father and there is no way that you could be the father. You would then ask the court to bring the real father into the suit and order him to pay any needed support for the child.
If you fail to assert this defense, then you could officially be adjudicated the father of this child. Once you are 'legally' declared dad, then some courts will not let you undo that determination later. The theory is that the courts do not want to make children parentless at a later date. If you are 'legally' declared dad, then you will be required to pay support for this child until it reaches adulthood. If you are 'legally' declared dad, then you will also have the rights of any other biological dad.