Sunan Abi Dawud, Hadith 5091

Narrated Abdullah ibn Abbas: AbuZumayl said: I asked Ibn Abbas, saying: What is that I find in my breast? He asked: What is it? I replied: I swear by Allah, I cannot speak about it. He asked me: Is it something doubtful? and he laughed. He then said: No one could escape that, until Allah, the exalted, revealed: "If thou went in doubt as to what we have revealed unto thee, and ask those who have been reading the Book from before thee." He said: If you find something in your heart, say: He is the first and the Last, the Evident and the Immanent, and He has full knowledge of all things.

حَدَّثَنَا عَبَّاسُ بْنُ عَبْدِ الْعَظِيمِ، حَدَّثَنَا النَّضْرُ بْنُ مُحَمَّدٍ، حَدَّثَنَا عِكْرِمَةُ، - يَعْنِي ابْنَ عَمَّارٍ - قَالَ حَدَّثَنَا أَبُو زُمَيْلٍ، قَالَ سَأَلْتُ ابْنَ عَبَّاسٍ فَقُلْتُ مَا شَىْءٌ أَجِدُهُ فِي صَدْرِي قَالَ مَا هُوَ قُلْتُ وَاللَّهِ مَا أَتَكَلَّمُ بِهِ ‏.‏ قَالَ فَقَالَ لِي أَشَىْءٌ مِنْ شَكٍّ قَالَ وَضَحِكَ ‏.‏ قَالَ مَا نَجَا مِنْ ذَلِكَ أَحَدٌ - قَالَ - حَتَّى أَنْزَلَ اللَّهُ عَزَّ وَجَلَّ ‏{‏ فَإِنْ كُنْتَ فِي شَكٍّ مِمَّا أَنْزَلْنَا إِلَيْكَ فَاسْأَلِ الَّذِينَ يَقْرَءُونَ الْكِتَابَ مِنْ قَبْلِكَ ‏}‏ الآيَةَ قَالَ فَقَالَ لِي إِذَا وَجَدْتَ فِي نَفْسِكَ شَيْئًا فَقُلْ ‏{‏ هُوَ الأَوَّلُ وَالآخِرُ وَالظَّاهِرُ وَالْبَاطِنُ وَهُوَ بِكُلِّ شَىْءٍ عَلِيمٌ ‏}‏

sunnah.com

also referenced under: Hadith 5110 (DarusSalam)