It is narrated on the authority of Jabir ibn 'Abdullah
There passed a bier and the Prophet (ﷺ) stood up for it and we also stood up along with him. We said: Messenger of Allah, that was the bier of a Jewess. Upon this he remarked: Verily, death is a matter of consternation, so whenever you come across a bier stand up.