Look, either you cheated on your wife or you didn’t. If you did then you deserve to not be trusted and you’re just wasting your time asking strangers on Quora how to get back in your wife’s good graces.
If you didn’t actually cheat on her, then you didn’t cheat on her and so you shouldn’t feel guilty about it. It’s your wife’s problem and not yours. You can’t lock your partner up in a cage and prevent all social contact.
That said, if she fell in love with you then you were interacting inappropriately with this other girl. Not half as bad as cheating, but still not entirely kosher. You can’t control whether someone falls in love with you or not but you can recognize when it’s happening and be careful to not encourage it. You didn’t discourage it from happening so you had a role to play in why it got messy.