Tell her, and tell her the truth, the whole truth, and nothing but the truth.
Here is the reason:
I am a BH.
Now, my wife told me almost everything. ALMOST everything. And everytime I learned something new, it hurt!
To personify this:
Imagine you have a giant cut across your stomach. Well, we put a bandaid on it, and it begins to slowly start healing. (this is you, trickle truthing her some facts)
Well, some time later, we rip off the bandaid, taking away most of the healing the cut has done, and put a new one on your giant and now open again cut. (you, revealing more facts)
And you do this enough, and the cut will never heal.
But you tell them everything up front, and the wound can heal.
Tell your wife. Confess before she finds out on her own. Take her to marriage counseling.
Better yet, tell her you want to work on your marriage and so you think you should see a marriage counselor together (make an appointment and have that ready to give her details if when and where). During the appointment, confess. I suggest this because your wife will probably be devastated and maybe having the context of you wanting to fix things will soften the blow and maybe having a pro there will help her so she doesn't feel totally hit by a truck with no one to help her. Alternatively, she might feel ambushed or manipulated.
Either way, tell her you did it, you're sorry, you regret it and won't go it again, you think xyz were the reasons you did this (but they aren't excuses), and that you'd like to make your marriage with her stronger so you are coming clean. Tell her she has access to all your info and beg her for a second chance. Respect her wishes if she doesn't want to give you another chance and give her the space and time to process the news of your betrayal. If she agrees, both of you should get MC and IC.
Just so you know there are lots of cheaters here to, I'm a member of that club. We've been where you are, some of us are still happily married to our spouses, some not.
Just FYI in case you want to reconsider and listen to some advice. I know your world is spinning. The people here will help you, they maybe harsh, but in what I bet is your current state you don't need subtle advice - you need cold hard truth.