1. Let her be. Respect her need to process this alone. If she wants your input, she'll ask for it. Otherwise, let her alone. She's imagining her life without you now. Let her do that, unencumbered by interference from you, the cause of her despair.
2. Shut the heck up. The fact that you blew it as badly as you did gives you zero talking rights. If she wants to talk to you, she will. If she doesn't, the best thing you can do is be quiet.
3. Be attentive. Right now it is all about her. Reduce your needs to one, and one only: being whatever, whenever, and however she needs you to be. If she lets you, stay near enough to her so that you can summarily attend to any need she might have (but not so near you end up hovering like a loser).
4. Be honest. Don't try to excuse, explain or justify your transgression. The least you can do is not try to spin what you did. You blew it. Own it.
5. Keep showing your neck. She's the boss now. Keep letting her know how much you understand that. Don't hang around making sad puppy-eyes, but let her know that you understand that in your relationship right now she's got 100% of the power.
6. Mind your business. Don't fall apart. Don't stop doing your laundry, or shaving, or anything like that. Keep your business together. That's the one thing you can do to seem like something less than the absolute loser she now thinks you are.
7. Start going to counseling. Right now your wife is facing two clear things about you: that you need to change, and that you're too weak to change. Show her that you agree with her on both counts, by beginning counseling. You do need counseling; and it's one of the best things you can do to show your wife how seriously you take what's happened. And definitely let her know that you want to go with her to marriage counseling, if she would.
8. FIX IT. Stop doing whatever it is you did. Change your behavior. If you're too angry, go to anger management. If you drink too much, go to AA. If you had an affair, slam shut and lock the door on the other woman. But change. That way, even if your wife leaves you, she'll leave a better man than the one who trashed her life. And ultimately you becoming a better person is what this must all be about.
9. Listen, listen, listen. At some point (if you're lucky) she's going to want to talk to you about what's happened. There will be a lot she needs to say. Don't screw up this critical phase of the healing process by interfering with it. Let her talk.
10. Dust off your Bible. If you've ever had any relationship with God at all, this is the time to avail yourself of that relationship. Pray, pray, pray, pray, pray. You get the spirit of God moving in your heart and around your house, and your marriage just might have a chance.