The first step is admitting that you have a problem and that you want to end the affair. This is not always easy, but it is a necessary step. You need to be honest with yourself and your partner about what is going on and why it is happening. If you are not willing to do this, then the affair will likely continue.
Once you have decided to end the affair, you need to take some time to yourself. This means spending time away from your partner and focus on your own life. It is important to do things that make you happy and that help you relax. This will give you the strength you need to end the affair for good.
It is also important to talk to your partner about what is going on. They need to know that you are serious about ending the affair and that you are willing to work on your relationship. This can be a difficult conversation, but it is one that needs to happen.
Finally, you need to be patient. Ending an affair is not something that happens overnight. It takes time to heal the wounds and to rebuild trust. But if you are willing to put in the work, then it is possible to end an affair successfully.