She may be feeling guilt and shame but another possibility is that the "affair" is continuing and that's the first question you need to answer. You missed a doctor's appointment so she went out and had a 3 week affair to include moving in with the guy. Hmmmmmm, that doesn't sound like an affair to me. It sounds as if you've had maritial problems for quite a while and she decided that the best way to solve them was with another guy, and you made it easier for her with your stint at basic.
I know you can't write everything in these posts but something else with no other explanation was your thought below;
"Since I knew of most of her past, I allowed this, not knowing that she thought I didn't want anything to do with her sexually. My concern was that I didn't want to be the one that made her relive her past."
If that means she's had other affairs, possibly with a prior lover or husband, and has confided that in you, and has now done the same to you, that's a big part of the problem. People make mistakes and it seems as if you are willing to see her affair as a mistake but she needs to recognize this and seek counselling as Sammi has suggested. If, however she's still seeing the other guy, counselling would be a waste of your time and emotional energy.