Bad thoughts can come to lot of people as part of our struggle with our worst enemy Shaytan. Your feeling annoyed from such thoughts means you are not with it and your heart and mind is with Allah not with the bad thoughts.
Tackling bad thoughts needs : Firstly: Knowing that these thoughts are instigated by Shaytan. When we know the evil source, we remain more alert.
Secondly: Seeking help from Allah (SWT) to tackle these evil thoughts. He always helps His servants who seek His help. Keep on praying and supplicating to Him even by repeating saying Ya Allah, Ya Allah, Ya Rahman, Ya Raheem etc. It is very useful to repeat ALLAHUMMA SALLI 'ALA MUHAMMAD WA AALI MUHAMMAD.
It is also very helpful to repeat Estighfaar and recitibg Sura Tawheed.
It is also very helpful to recite Sura Qaaf with voice that your can hear.
Seeking the Waseelah of Ahlul Bayt (AS) is very helpful especially Imam Al-Mahdi (AS).