Jami` at-Tirmidhi 3659
Narrated Ibn Abi Mu'alla:
from his father: "The Messenger of Allah (ﷺ) gave a Khutbah one day and said: 'Indeed there is a man whose Lord has given him the choice between living in this life as long as he wishes to live, and eating from this life as much as he wishes to eat, and between meeting his Lord.'" He said: "So Abu Bakr cried. The Companions of the Prophet (ﷺ) said: 'Are you not amazed at this old man, when the Messenger of Allah (ﷺ) mentioned a righteous man whose Lord gave him the choice between this life or meeting his Lord, and he chose meeting his Lord.'" He said: "But Abu Bakr was the most knowledgeable one of them regarding what the Messenger of Allah (ﷺ) had said. So Abu Bakr said: 'Rather we will ransom our fathers and wealth for you.' So the Messenger of Allah (ﷺ) said: 'There is no one among people more beneficial to us (Amanna Ilaina) in his companionship, or generous with his wealth than Ibn Abi Quhafah. And, if I were to take a Khalil, I would have taken Ibn Abi Quhafah as a Khalil. But rather love and the brotherhood of faith' - saying that two or three times - 'Indeed your companion is the Khalil of Allah.'"
حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ الْمَلِكِ بْنِ أَبِي الشَّوَارِبِ، 
 قَالَ حَدَّثَنَا أَبُو عَوَانَةَ، عَنْ عَبْدِ الْمَلِكِ بْنِ عُمَيْرٍ، عَنِ ابْنِ أَبِي الْمُعَلَّى، عَنْ أَبِيهِ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم خَطَبَ يَوْمًا فَقَالَ ‏"‏ إِنَّ رَجُلاً خَيَّرَهُ رَبُّهُ بَيْنَ أَنْ يَعِيشَ فِي الدُّنْيَا مَا شَاءَ أَنْ يَعِيشَ وَيَأْكُلَ فِي الدُّنْيَا مَا شَاءَ أَنْ يَأْكُلَ وَبَيْنَ لِقَاءِ رَبِّهِ فَاخْتَارَ لِقَاءَ رَبِّهِ ‏"‏ ‏.‏ قَالَ فَبَكَى أَبُو بَكْرٍ فَقَالَ أَصْحَابُ النَّبِيِّ صلى الله عليه وسلم أَلاَ تَعْجَبُونَ مِنْ هَذَا الشَّيْخِ إِذْ ذَكَرَ رَسُولُ اللَّهِ صلى الله عليه وسلم رَجُلاً صَالِحًا خَيَّرَهُ رَبُّهُ بَيْنَ الدُّنْيَا وَبَيْنَ لِقَاءِ رَبِّهِ فَاخْتَارَ لِقَاءَ رَبِّهِ ‏.‏ قَالَ فَكَانَ أَبُو بَكْرٍ أَعْلَمَهُمْ بِمَا قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم فَقَالَ أَبُو بَكْرٍ بَلْ نَفْدِيكَ بِآبَائِنَا وَأَمْوَالِنَا ‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ مَا مِنَ النَّاسِ أَحَدٌ أَمَنَّ إِلَيْنَا فِي صُحْبَتِهِ وَذَاتِ يَدِهِ مِنِ ابْنِ أَبِي قُحَافَةَ وَلَوْ كُنْتُ مُتَّخِذًا خَلِيلاً لاَتَّخَذْتُ ابْنَ أَبِي قُحَافَةَ خَلِيلاً وَلَكِنْ وُدٌّ وَإِخَاءُ إِيمَانٍ وُدٌّ وَإِخَاءُ إِيمَانٍ مَرَّتَيْنِ أَوْ ثَلاَثًا وَإِنَّ صَاحِبَكُمْ خَلِيلُ اللَّهِ ‏"‏ وَقَدْ رُوِيَ هَذَا الْحَدِيثُ عَنْ أَبِي عَوَانَةَ عَنْ عَبْدِ الْمَلِكِ بْنِ عُمَيْرٍ بِإِسْنَادٍ غَيْرِ هَذَا ‏.‏ وَمَعْنَى قَوْلِهِ أَمَنَّ إِلَيْنَا يَعْنِي أَمَنَّ عَلَيْنَا ‏.‏ وَفِي الْبَابِ عَنْ أَبِي سَعِيدٍ وَهَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ ‏.‏