If you are having an affair and you decide to end it then it is the wisest decision you have made in your life. It will not only free you from intense guilt feeling but it may solve your old relationship problem. However, ending an affair is not as easy as you think. It require proper handling, otherwise instead of giving it peace, it will bring turmoil in your life.
If you are sure that you want to break up with your lover then first of all tell your wife about it. Tell her that you are having an affair with so and so, but now it is the history as you realized your mistake. For some, telling about their affair to their wife is very difficult. However, you have to do it if you don't want to break up your marriage also.
Now tell your lover that you are ending this affair. There is a good and logical reason why you must tell your wife first before telling your lover. Since, it is often observed that when you tell your lover about ending an affair, the opposite party will react and tell your wife about the affair. This will be a big blow to your marriage but if your wife knows about your affair, she will calmly reply that it was history and you are saved.
Once you have ended an affair, make it a full stop. Never ever try to contact other party. If other party is contacting you then change your mobile number, email id and other contact information. If it is not inconvenience then with your wife permission you may move to other city leaving no trail behind.