Riyad as-Salihin 428: On Hope and Good Expectation
Abdullah ibn Amr ibn ‘As relates that the Holy Prophet recited the words of Allah concerning Abraham that he prayed: Lord, they have indeed led astray large numbers of people. So whoever follows me, he is certainly of me; and whoever disobeys me in his case also Thou art surely Most Forgiving, Ever Merciful (14.37); and the words of Jesus: If Thou decide to punish them, they are Thy servants; and if Thou forgive them, Thou surely art the Mighty, the Wise (5.119); and then raised his hands and said: O Allah, my people, my people; and wept. Allah commanded Gabriel: Go to Muhammad (thy Lord knows all) and ask him: What makes you weep? So Gabriel came to him and the Holy Prophet told him what he had said. (Allah knew it). He commanded Gabriel: Go to Muhammad and tell him: We shall cause thee to be pleased in the matter of thy people, and shall not make thee sorrowful (Muslim).
((رواه مسلم)).