Honestly in this kind of situations you have 2 choice, tell or don't tell.
If you tell her she will most likely break up with you. cheating is a taboo, and when it's done with someone else you know it's a betrayal and a rejection in one. Some people might say "She was angry at first but we worked it out", but personally I believe the only way one can work such a thing out is if she's not that emotionally invested in your relationship. Some people might find that in itself an advantage or a disadvantage.
If you don't tell her you'll be carrying your own guilt, assuming you do feel guilty beyond knowing that cheating is wrong. If you and your friend can keep quiet and move on, and you make sure to end your relationship the time you don't feel invested anymore without cheating first, then it's a valid option.
Personally I believe that once you've cheated you've crossed the line. I would never trust anyone I found out had ever cheated, not even if it was 20 years ago. The thing is, cheating is less of a betrayal if you don't consider it to be a betrayal from the start. Saying that you know it's wrong and feel terrible for it shows that you have values that you were able to distance yourself from and ignore. That in my opinion, is the worst betrayal. A person who is cold from the start will act accordingly, always. Thus it is easier for an affected individual to pass it off as "He was a bad guy". When the good guys do horrible things, now that's when you might seriously hurt someone.
I'm not judging you OP, no one will gain anything from that. What I've written is just my view on it.