If she's the one having an affair, why would YOU be the one to leave?
Please consult with a good family law attorney on this before leaving your home -- preferably one who specializes in "men's rights" and paternal custody issues. In many jurisdictions, your moving out could give your wife grounds for an "abandonment" charge against you.