I haven't been in this situation and I used to think that you can be with someone and that they would be just as into you too. But the reality is that, to be in a true relationship, both of you need to know who you are as individuals. From the sound of things, one of you have been lying about who you are as a person. Or both of you have tried to accommodate each other and it pushed each other away.
Have you ever asked her about why she was messing around with somebody ? There is a need that is not being met. Does she know what it is ? The other thing is, do you guys talk about your actual relationship itself too, or feelings about one another's actual personal growth ? Do you guys have similar personalities or opposing personalities ?
You genuinely need to be very honest you know. Even me and my ex was very honest too. We told one another what we expected from each other, and what are our strengths and weaknesses. If you want to aim for true unconditional relationships then you got to be brave to face this kind of music. Either it will bring you together more, or that it will give you closure and that you guys depart.
Most threads on here on MN where the guy cheats, then the relationship is over. You got to ask yourself honestly when you are clinging onto her. If it is because you feel that you will not find someone else, then this is not really a good enough excuse, cos once you are out of this environment, opportunities will become clearer.