My girlfriend cheated on me

Like the title says, my girlfriend cheated on me with a 25-year-old man while she is only 18. She slept with him twice, and he's her next-door neighbor. She told me this a few hours ago, and now I wonder if I offended someone in my past life to deserve this. I informed all her family members about what happened, so now everyone knows. But I feel so alone inside. I keep thinking if I could have done something better. We've been arguing and trying to work on our relationship for the past month, but no matter how bad it got, I would never have cheated on her. I’m really upset and don’t know what to do. I feel so lonely right now, and I really hate it.