How do i get the trust back of someone i love that i have betrayed?
First of all I’m really proud of you for reaching out for help! It’s definitely a hard step, Allowing yourself to be vulnerable and admit to things that we are not proud of. I think that it says a lot about you and your dedication and determination to make things right.
One of the first steps could be to look into what led you to be pulled towards the friend of your wife. Are there things that you feel like you aren’t getting from her that you could get from the friend? Most of the time people seek outside attention when they aren’t getting what they need from their current relationship. Part of earning trust back is knowing where it was lost, so figuring out what caused you to want to look outside of your relationship and explaining that to your partner might be beneficial in getting it back. Sounds like there are changes that probably need to happen on both ends to have a successful, happy relationship. It's also a factor in looking at how she ended up finding out ... did you tell her, or did her friend? I think that part of rebuilding trust is just that .... being totally open and transparent as much as you can be right now.
Another thing to consider is whether she would be open to doing possibly couple / marital counseling. It can be extremely beneficial to have a non-biased person to help mediate discussions over what the biggest concerns are, whether this is something that can be fixed, and if so, the steps in moving forward, and if not, begin processing how to move on from there as well. It's important in re-building the trust to know if your wife is even on board or not -- so that you know how to move forward in your own life as well. I hate that you are dealing with this situation, I know that both of you are probably hurt and confused and it will definitely take time if nothing else to heal some of the damage.
I think sitting down and talking about the reasons that you truly want this to work, why you still want to be with her, and taking it back to the basics, as well as respecting her need for space if she requests it, will be key factors in rebuilding if that is a goal.
I hope this helps and I wish you all the best moving forward!