The Messenger of Allah ﷺ said, "When one of you intends to undertake some matter, let him say, 'O Allah, I seek Your guidance through Your knowledge, and I seek Your power through Your might, and I ask You from Your immense bounty. For You have power and I have none, You know and I do not, and You are the Knower of all that is hidden. O Allah, if such-and-such is good for me in my religion, my livelihood, and the outcome of my affair, then decree it for me and bless me in it. But if it is otherwise that is better for me, then decree for me what is good wherever it may be, and make me content with Your decree.'"
قال رسول الله ﷺ: إذا أراد أحدكم أمرا، فليقل: اللهم إني استخيرك بعلمك واستقدرك بقدرتك، وأسألك من فضلك العظيم، فإنك تقدر ولا أقدر، وتعلم ولا أعلم، وأنت علام الغيوب، اللهم إن كان كذا وكذا خيرا لي في ديني، وخيرا لي في معيشي، وخيرا لي في عاقبة أمري، فاقدره لي، وبارك لي فيه، وإن كان غير ذلك خيرا لي فاقدر لي خيرا حيث ما كان، ورضني بقدرك.
Ibn Hibban (886), Bukhari in his Tarikh (4/258), and Tabarani in Dua (1306) all narrated it through various chains from Ibn Abu Fudayk, who said, we were told by Abu Mufaddal bin Ala bin Abdul-Rahman, from his father, from his grandfather, from Abu Hurairah, and he related it. The wording given is that of Ibn Hibban. Its chain is hasan because of Ibn Abu Fudayk, who is Muhammad bin Ismail, one of the narrators found in the collections of all the major compilers, though he is only "truthful," and because of Abu Mufaddal.Ibn Hibban said following the hadith, "His name is Shibl bin Ala bin Abdul-Rahman, sound in his standing regarding hadith." And he said in Thiqat (6/452), "He narrated from Ibn Abu Fudayk a sound body of transmission." Ibn Hajar also graded it hasan. See Futuhat Rabbaniya (3/347).As for what is narrated from Abu Bakr Siddiq, that the Prophet ﷺ, whenever he wanted to do something, would say, "O Allah, choose well for me and select for me," its chain is daif. It was narrated by Tirmidhi (3516), Bazzar (59), Abu Yaala (44), Ibn Sunni in Amal al-Yawm wal-Layla (598), and Ibn Adi in Kamil (3/1090), all through various chains from Zanfal bin Abdullah, from Abdullah bin Abu Mulayka, from Ayesha, from Abu Bakr Siddiq, who related it.Tirmidhi said, "This is a gharib hadith, known only through the report of Zanfal, who is daif according to the scholars of hadith. He is called Zanfal bin Abdullah Arafi, and he used to live in Arafat. He alone transmitted this hadith, and no one else corroborates him."Abu Zura Razi said, "This is a munkar hadith, and Zanfal has weakness in him, he amounts to nothing." Ilal al-Hadith (2101).