Abdullah bin Amr bin As reported,

The Prophet ﷺ recited the words of Allah عز وجل concerning Ibrahim, "My Lord, indeed they have led astray many among the people. So whoever follows me, he is of me" [Ibrahim 14:36], and the words of Isa عليه السلام, "If You punish them, they are Your servants, but if You forgive them, indeed it is You who are the Mighty, the Wise" [Maidah 5:118]. Then he raised his hands and said, "O Allah, my ummah, my ummah," and he wept.Allah عز وجل said, "Jibreel, go to Muhammad, though your Lord knows best, and ask him what makes him weep."Jibreel عليه السلام came to him and asked him, and the Messenger of Allah ﷺ told him what he had said, though Allah knew best.Allah said, "Jibreel, go to Muhammad and say, 'We shall please you concerning your ummah and shall not grieve you.'"

Muslim 499

Sahih

حدثني يونس بن عبد الأعلى الصدفي أخبرنا ابن وهب قال أخبرني عمرو بن الحارث أن بكر بن سوادة حدثه عن عبد الرحمن بن جبير

عن عبد الله بن عمرو بن العاص

أن النبي ﷺ تلا قول الله عز وجل في إبراهيم {رب إنهن أضللن كثيرا من الناس فمن تبعني فإنه مني} الآية وقال عيسى عليه السلام {إن تعذبهم فإنهم عبادك وإن تغفر لهم فإنك أنت العزيز الحكيم} فرفع يديه وقال اللهم أمتي أمتي وبكى فقال الله عز وجل يا جبريل اذهب إلى محمد وربك أعلم فسله ما يبكيك فأتاه جبريل عليه السلام فسأله فأخبره رسول الله ﷺ بما قال وهو أعلم فقال الله يا جبريل اذهب إلى محمد فقل إنا سنرضيك في أمتك ولا نسوءك

مسلم 499صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Faith
Chapter
Prophet ﷺ supplicating for his ummah and weeping out of compassion for them
Numbering
Darussalam 499
Muslim 499