My very dear one,
Thank you for your kind letter. I understand your situation. Don’t worry at all about the thoughts that arose. They do happen. I was once doing prostrations some years ago, and the thought came that maybe the Buddha doesn’t exist. It didn’t last long, though. This comes from heresy from strong negative karma from past lives. You should practice Samayavajra during guru puja, at the section after the offerings and before the confession.
You can also offer tsog to the guru to purify that, and also a few malas of OM AH HUM.
It is also good to do prostrations to the Thirty-five Buddhas, particularly to the last Buddha. This purifies negative karma connected with the guru, and should be done three times or more.
Much love and prayer...