I often get doubts in my head and sometimes utter blasphemous things that later make me feel very guilty and scared. How can I get rid of this issue?
Our worst enemy (Shaitan) tries to disturb us in different ways including creating doubts in our minds which can be blasphemous and very disturbing. Our feeling that these doubts are bad is a sign that we reject it and don't believe in it. We need to deal with any doubt with proper thinking to be very clear that these doubts are untrue. We also need to seek refuge in Allah from satanic whispering by repeating (A'OOTHO BILLAH MINASHSHAITAN ARRAJEEM أعوذ بالله من الشيطان الرجيم
Repeating LA ILAAHA ILLALLAH لا إله إلا الله is also very useful in driving away Shaitan from our mind.
Repeating reciting Sura Al-Tawheed is also very useful in this regard.
Generall, any form of Thikrullah ( remembering Allah) is useful for protection from satanic evil.
'You should not feel guilty because you did not believe in the Satanic doubts, but keep on seeking refuge in Allah and seeking His help and support.
Wassalam.