What should one do about intrusive thoughts and how bad are they considered to be in Halacha? For example, if one is in the shower, or otherwise in a state of impurity or in an impure place, and suddenly one begins thinking about Torah concepts or in one’s head one thinks of a pasuk with Hashem’s name in it. What should one do and how terrible is this occurrence?
Have a great Shabbos, and thank you very much for your Halachic guidance
We should be careful not to think holy thoughts in dirty places, such as a bathroom. Thinking torah thoughts then is not a mitzva but an aveiro. Regarding a state of impurity, it isn’t clear to me what your intention is. If you are referring to when a man is a baal keri, nowadays it is permitted for a man to learn torah and think torah thoughts even if he is a baal keri. When a person is not supposed to have such thoughts, and he has them, he should simply “change the subject” in his mind, which is not very difficult to do.
M:B 88-1 Nikios Vkavod Btefillah 9-2.