Sayyiduna Buraydah (may Allah be pleased with him) narrates: Taking evil omens was mentioned in the presence of the Prophet (peace and blessings be upon him), and he said: "Whoever is affected by any of that, and cannot avoid it" (the narrator says: these words of the Prophet (peace and blessings be upon him), "and cannot avoid it", are dearer to us than such-and-such) (the Prophet said:) "then let him say: 'O Allah, there is no omen except what You decree, there is no good except the good You grant, and there is no god besides You.'"
Imam al-Bazzar recorded it. Its chain contains al-Hasan bin Abi Ja'far, and he is matruk (abandoned); it has also been said of him: He is saduq (truthful) but munkar al-hadith (narrates objectionable hadith).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الطب / 8413