Question: I have committed adultery. The guilt is haunting me.
Answer: Why not visit a temple, and bow to the Buddha for an extended period of time to express your remorse formally, and vow not to ever let it happen again? If you feel it is appropriate, let your spouse know about what happened too. If it is not appropriate at the moment, because you have repented and resolved not to make the mistake again, just let it go.
Question: My mind is so weak. This is not the first time I made the mistake.
Answer: Exactly because your mind is weak, you should visit a temple to express your determination to overcome this firmly. Try to attend more Dharma classes to direct your mind away from unwholesome stray thoughts too, which lead to your straying away. There are Dharma techniques you can learn for countering lust too. You might also want to attend professional private counselling to help trace the root of the problem, of why you tend to stray away.