I came in to the Messenger of Allah ﷺ on the day his illness began, and I said, "Oh, my head!"He said, "I wish that had happened while I was still alive, so I could have prepared you for burial and buried you myself."I said, out of jealousy, "I can just imagine you, on that very day, taking another wife as a bridegroom!"He said, "Rather, oh, my head! Call your father and your brother for me, so I may write a document for Abu Bakr. For I fear that someone may speak up, or someone may wish, claiming, 'I am more deserving.' But Allah and the believers will accept none but Abu Bakr."
حدثنا يزيد أخبرنا إبراهيم بن سعد عن صالح بن كيسان عن الزهري عن عروة
دخل علي رسول الله ﷺ في اليوم الذي بدئ فيه فقلت وا رأساه فقال وددت أن ذلك كان وأنا حي فهيأتك ودفنتك قالت فقلت غيرى كأني بك في ذلك اليوم عروسا ببعض نسائك قال وأنا وا رأساه ادعوا إلي أباك وأخاك حتى أكتب لأبي بكر كتابا فإني أخاف أن يقول قائل ويتمنى متمن أنا أولى ويأبى الله عز وجل والمؤمنون إلا أبا بكر
Its isnad is sahih. Bukhari reported it, 10/123 no. 5666, in the chapter on illness, and Muslim, 4/1857 no. 2387, in the chapter on the virtues of the companions, and Tirmidhi, 5/614 no. 3737, in the chapter on virtues, and he said, hasan gharib.