The Messenger of Allah ﷺ went out to visit Abdullah bin Ubayy during the illness from which he died. When he entered upon him, he recognized that death was upon him and said, "I used to forbid you from loving the Jews."Abdullah bin Ubayy replied, "Saad bin Zurara hated them, so what came of him?"When he died, his son came to the Prophet and said, "Messenger of Allah, Abdullah bin Ubayy has died. Give me your shirt so I may shroud him in it."So the Messenger of Allah ﷺ took off his shirt and gave it to him.
خرج رسول الله ﷺ يعود عبد الله بن أبي في مرضه الذي مات فيه، فلما دخل عليه عرف فيه الموت قال: قد كنت أنهاك عن حب يهود قال: فقد أبغضهم أسعد بن زرارة، فمة؟ فلما مات أتاه ابنه فقال: يا رسول الله! إن عبد الله ابن أبي قد مات فأعطني قميصك أكفنه فيه. فنزع رسول الله ﷺ قميصه فأعطاه إياه.
Abu Dawud narrated it (3094) from Abdul-Aziz bin Yahya, who said, Muhammad bin Salama narrated to us, from Muhammad bin Ishaq, from Zuhri, from Urwa, from Usama bin Zayd, and he related it. Muhammad bin Ishaq is a mudallis, but he explicitly stated the mode of transmission in the Sirah, and from that version Bayhaqi narrated it in Dalail (5/285) and Ibn Kathir in al-Tarikh (34/5), and with this the chain becomes hasan.Waqidi said, Abdullah bin Abu fell ill during the last nights of Shawwal and died in Dhul-Qaidah. His illness lasted twenty nights, during which the Messenger of Allah ﷺ used to visit him. On the day he died, the Messenger of Allah ﷺ came in to him while he was breathing his last, and said, "I forbade you from loving the Jews." He replied, "Asaad bin Zurara hated them, so what good did that do him?" Then he said, "Messenger of Allah, this is not the moment for reproach, this is death. Attend to my washing, and give me your shirt that touches your skin, so that I may be shrouded in it, pray over me, and ask forgiveness for me." So the Messenger of Allah ﷺ did that for him.Ibn Kathir mentioned this in his Tarikh (34/5–35) and said, "Bayhaqi narrated, from the hadith of Salim bin Ajlan, from Saeed bin Jubayr, from Ibn Abbas, something similar to what Waqidi mentioned." I say, it will come later.