You have to be real strong right now. Time is your friend. Dont make any decisions like packing and leaving that you will regret later. You say it yourself - "I am in such a funk that I can hardly function". Dont make any decisions, because John, you are letting your emotions control you now.
Talk to some friends. Seek the advise from your minister or priest. Take a short vacation. Go do some things to make yourself happy. Get away from it all. Think this through. Give it time and your thoughts will become much more clear. Maybe you can learn to forgive your W for an A if she is willing to reconcile. This is something you need to ponder on for a while.
Just keep in mind that your W is going through some deep thinking also. If you back off, she may get some clarity and see what she is doing is wrong.