A yeshiva student is meant to grow in fear of heaven, Torah, and mitzvot to perfection. That's also why you deal with strange thoughts that confuse you. I suggest you deliberate in front of your teachers and do as they instruct you. Don't engage in your bad thoughts; change your thoughts to positive ones and look inside a sefer.
https://www.torahrecordings.com/rebbe/igroskodesh/012/006/4144