Fiqh-us-Sunnah Volume 4, Funerals and Dhikr, Fiqh 4.132A.

Section : What to Say When One is Struck by Doubt.

Abu Hurairah reported that Allah’s Messenger, peace be upon him, said, “Satan comes to you and says, ‘Who created so-and-so, until finally he says, ‘Who created your Lord?’ So, when he inspires such a doubt, one should seek refuge with Allah and give up such thoughts.” (Bukhari and Muslim)

Another sahih hadith reports that the Prophet, peace be upon him, said, “The people will continue raising questions until they ask, ‘Allah created the creation, but who created Allah?’ So whoever is faced with such a situation should say, ‘I believe in Allah and His messengers’.”