What do you mean about a child you were led to believe is yours? That was pretty garbled, but under the circumstances, I'm surprised you haven't gotten a DNA test. This isn't a minor issue!
Anyway, you're trapped because you have a pattern of making horrible choices. This can be fixed, but not if you don't acknowledge that and take responsibility for it. As usual, it's your kids suffering the most. They didn't ask for any of this, and they're living in a war zone.
The first thing you do is talk to an attorney. The initial consult is often free, but right now, you don't have enough info to know the next step. Also, do not leave the home until you've done this. In some states, this would be a big negative. Get that appt by the end of the week, because you're way overdue.
Once you have more info, you'll have a better idea what your options are. If you feel deep down that you're a better parent, one of them is go for primary custody. Also, in many states, you would not be subject to alimony. So get going on that, and the rest will slowly fall into place.
But always remember the true victims here, and those are your kids. They are already damaged (maybe permanently) by the crap you and your wife have put them through. Stay focused on them, even if it means going to school part time or taking a semester off to get things settled.