When you cheat on your wife you risk losing her forever. If you have cheated and you want to stay married, the path ahead of you will be difficult. You must regain the trust and love of your wife in order to have a healthy, happy marriage. You must have patience and be willing to do whatever it takes to win your wife back after an affair.
Cut off all communication between yourself and the person with whom you cheated. If you continue talking to that person, your wife will find out, and if you are serious about keeping your wife, you won't want to talk to that person. If the person with whom you cheated is someone that you have to see on a regular basis, such as a co-worker or your child's parent, this will be more difficult. Keep all contact with that person to a minimum.
Have an honest conversation with your wife about why you cheated on her. Tell her how your relationship has changed and decide what you can both do to fix it. Do not blame your cheating on your wife. You alone are responsible for your actions.
Ask your wife what you can do to regain her trust. She may want you to check in with her during the day more often or be home by a certain time at night. If you truly want to keep your wife, you will do whatever she asks to help her to trust you.
Get counselling. Ask your wife to go to marriage counselling with you to repair your marriage. A professional counsellor will be able to help you to understand why you cheated and show you ways to get your marriage back on track.
Do not involve your children in any relationship conflict.