He reported from the Prophet ﷺ that he said, "Had I taken anyone as a closest friend, I would have taken Abu Bakr as my closest friend. But he is my brother and my companion, and Allah has taken your companion as His closest friend."
حدثنا محمد بن جعفر حدثنا شعبة عن إسماعيل بن رجاء قال سمعت عبد الله بن أبي الهذيل يحدث عن أبي الأحوص قال سمعت
يحدث عن النبي ﷺ قال لو كنت متخذا خليلا لاتخذت أبا بكر خليلا ولكنه أخي وصاحبي وقد اتخذ الله عز وجل صاحبكم خليلا
Its isnad is sahih. Ismail bin Raja bin Rabia Zubaydi is trustworthy. Ibn Main, Abu Hatim, Nasai and others attested to his trustworthiness, and Bukhari mentioned him in Kabir 1/1/353. The hadith is given in longer form at 4161.