A funeral procession passed by us, so the Messenger of Allah ﷺ stood up and we stood with him.I said, "Messenger of Allah, it is only the funeral of a Jew."He replied, "Death is something terrifying, so when you see a funeral procession, stand up."The wording is that of Khalid.
أخبرنا علي بن حجر قال حدثنا إسمعيل عن هشام ح و أخبرنا إسمعيل بن مسعود قال حدثنا خالد قال حدثنا هشام عن يحيى بن أبي كثير عن عبيد الله بن مقسم
مرت بنا جنازة فقام رسول الله ﷺ وقمنا معه فقلت يا رسول الله إنما هي جنازة يهودية فقال إن للموت فزعا فإذا رأيتم الجنازة فقوموا اللفظ لخالد
Reported by Muslim, no. 960, from Ali bin Hajar, and Bukhari, in the Book of Funerals, chapter on one who stands for the funeral of a Jew, no. 1311, through the hadith of Hisham Dastawai, with the same wording. It is also in Al-Kubra, no. 2049.* Ismail is Ibn Ulaya.