Advice from the old lady:
Warning. This is long.
The guys are right. This is the worst offense possible. Infidelity is the greatest breach of trust possible to a man. It's not much better to a woman, but I do agree men are far more emotionally able to have a "just" physical affair. This is never, and I mean NEVER the case with women unless she is a stripper, hooker or previously super sexually promiscuous, which you'll know the upshot of. I do not condone cheating in a marriage because it is a fatal breach of trust in my eyes, but some couples do recover and flourish afterwards. That is a decision you will have to make based on your situation. If you file first you are the plantiff in the proceeding. This means you get to go first to present your side of things in court, which will predispose the judge to see you in a more favorable light.
Also. She will make it your fault in some direct or indirect way. Never mind that these shortcomings were never communicated to you to digest, evaluate and take action on (or not). Just be aware that it is an extremely rare woman who accepts accountability for her actions.
Affairs are always about deeper things than what appears on the surface. In happy unions where sexual activity is a high priority and the partners and the marriage come first this is unlikely to occur.
I understand and acknowledge your desire to raise your children within an intact family. But know this: Children are far wiser than their years and they WILL know it's a marriage based on pretense if you tough it out "for the kids"...and you'll not teach them any healthy lessons about marriage and/or relationships by remaining out of duty. They will know in time, and they will resent both of you for it, and they will have zero idea how to build a thriving healthy relationship. Give that a think.
The other things to consider of course are the financial entanglements that come with marriage and children as well as what a court will require you to do or not do vis-a-vis your divorce decree and custody agreement. If you are at great financial peril then you need to think ahead, weigh your options and plan wisely as others have suggested. You may also need to consider proximity and stability for the children as well as various custody options.
So you know, I am a divorced mother of 3. There was zero cheating in my first marraige (I am now engaged to someone else after 8+ years single) but there were circumstances that were grave such that they warranted divorce. What I did in my case was sat my first husband down, discussed very plainly and over a length of time (years) what needed to occur for the marraige to remain tenable for me, and then I gave him 5 years to adjust course. He didn't do a thing. So I after 5 years I divorced him switfly, and amicably and he understood exactly why I was leaving and he also knew I had given him the opportunity to do differently for years before I pulled the plug. I was the breadwinner and as such was at great financial risk. Because of the transparency with which I handled things and for the greater good of the children, I was able to get out of that marriage financially intact and I have kept my word on things I said I would do for him in a finacial sense.
My children are well aware why I left him and they see a healthy example of a relationship now in my current partner, and they have a real world view of why relationships work, and why they don't. I am kind to my first husband on the infrequent occassions where we speak (we talked much more when the children were younger for parenting reasons) and he is a loving father who my children love deeply. My kids were 13 (son), 10 (daughter), and 6 (daughter) at the time we divorced. They are all 8 years older now. They are very well adjusted, sensible young people now and they know nothing was their fault, they see their father and I as real people and they do not have Disney perceptions about how things are, even though they have your standard issue idealism of youth. Children are smart, observant, and resilient.
But you've got to weigh the greater tapestry of what sort of life your family has been living. If it is a family keeping up appearances for extended family, friends, and social circles, then the come to Jesus meeting is much different than if there has been ongoing communication about needs, responsibilities between you and your wife and the state of the marriage.
Marriages are living things in a sense. If you do not care for them and feed them they will die. Only you know what sort of care and feeding you and your wife have provided for the marriage. Additionally I believe strongly that marriages must have the following priorities in order to thrive:
1. Lovers to one another (sex, intimacy, the lover bond)
2. Partners and friends to one another
3. Parents
Being a parent is a distant 3rd to the first 2 priorities. Why? Because you are only raising children for a season of your life, while your spouse has committed to be your life partner until one of you dies. Furthermore, the way you and your spouse treat one another and prioritize one another becomes the template from which your children will learn how to do relationships. Child centric marriages are NOT how to have a healthy family life or marriage.
Those are some thoughts off the cuff. Welcome. Read and absorb around here. There is much support and wisdom to be had if you poke around.
I am sorry you are going through this. Give yourself time and space to really consider what the best solution(s) are. Hang in there. One way or another you will get through it.