@Commanders16,
How long has it been since your girlfriend was unfaithful? If it was very recently, it is normal to have lingering thoughts. If it has been a good while, you have to decide to move forward with her and leave him in the past or to move on without her.
Your girlfriend's actions need to show that she is remorseful and you can trust her now. If you feel you can trust her and she is worth being with, you need to focus on rebuilding your relationship.