We were with the Prophet ﷺ when a funeral procession passed by us, and he stood up for it. When we went to carry it, we realized it was the funeral of a Jew, so we said, "Messenger of Allah, this is only the funeral of a Jew."He replied, "Death is a fearful event. When you see a funeral, stand up."
حدثنا مؤمل بن الفضل الحراني حدثنا الوليد حدثنا أبو عمرو عن يحيى بن أبي كثير عن عبيد الله بن مقسم حدثني
كنا مع النبي ﷺ إذ مرت بنا جنازة فقام لها فلما ذهبنا لنحمل إذا هي جنازة يهودي فقلنا يا رسول الله إنما هي جنازة يهودي فقال إن الموت فزع فإذا رأيتم جنازة فقوموا
Bukhari narrated it in the Book of Funerals, chapter of one who stands for the funeral of a Jew, hadith no. 1311, and Muslim narrated it in the Book of Funerals, chapter of standing for the funeral procession, hadith no. 960, both from the hadith of Yahya bin Abu Kathir, with this chain.