A Wonderful Remedy
One should relate before ones teacher who instructs him in the way of HaShem, or even before a good friend, all of one's thoughts that are contrary to the Holy Torah that the Yetzer HaRah causes to arise in his mind or heart. [This is the case whether they occur] when he is learning Torah, or praying, sitting in his bed or during the day. And he should not withhold anything because of shame. He will find that by relating these things he will gain the power to break the strength of the Yetzer HaRah so that it will no longer be able to overcome him another time. This is besides the good advice you will receive from your friend, which is the way of HaShem. This is a wonderful remedy.