Change your actions and do what is necessary to prevent the temptation from occurring again. This means gaining insight into what triggered the affair and taking steps to prevent it again.
Do not merely listen to the word, and so deceive yourselves. Do what it says. James 1:22