You found out. Maybe a message you weren't meant to see, maybe a confession, maybe the slow accumulation of things that finally added up. However it came, the floor of your life has tilted, and you're reading this because you don't know what to do with your own body, let alone your marriage.
First, the only thing that needs saying right now. What you're feeling, the nausea, the shaking, the inability to eat or sleep, the same images running on a loop, the swing from rage to disbelief to a strange flat calm and back, none of that is you overreacting. That's what betrayal does to a person. It's a kind of shock, and your reaction to it is normal, even when it feels like you're coming apart.
Here is the most useful thing anyone can tell you in these first hours. You do not have to decide anything about your marriage right now. Not today, not this week. The pressure you feel to know immediately whether you're staying or leaving is the shock talking, and the shock is the worst possible state to make a decision that large in. The only real task in front of you is to get through the days, and to not do anything you can't undo while the ground is still moving.
That cuts both ways, gently. You don't have to forgive, and you don't have to decide to leave. People in this exact place do both, in time, and both can be the right answer, and neither has to be reached tonight. This doesn't have to be the end of your marriage. It also doesn't have to be saved. Right now it doesn't have to be anything except survived, one ordinary, awful hour at a time.
A word about the loop in your head that wants to act. The urge to confront, to expose, to hurt back, to burn it all down, is completely understandable, and acting on it in the first shock tends to leave people with one more thing to carry later. You're allowed to be enraged. You don't have to be governed by it this week.
Don't do this alone. Tell one person you trust, someone who can sit with you without an agenda for what you should do. And when you're steadier, even a little, this is exactly what a good therapist is for, whether the marriage continues or not. You'll need somewhere to put this that isn't only your own spinning mind.
The ground will stop moving. Not today, but it will. And when it does, you'll be able to think about what you want, which is a different and more answerable question than the one screaming at you right now. For tonight, the task is only to get to tomorrow. That's enough. That's everything.
This is supportive self-help, not medical, psychological, or legal advice, and no substitute for a qualified professional. If you or your child may be in danger, contact your local emergency services.