It is narrated from Hazrat Abu Musa (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: When the funeral procession of a Jew, Christian, or Muslim passes in front of you, then stand up, because you are not standing for the funeral itself, but for the angels who accompany the funeral.
Hadith Referenceمسند احمد / تتمہ مُسْنَدِ الْكُوفِيِّينَ / 19491
Hadith Gradingحکم دارالسلام:صحيح لغيره، وهذا إسناد ضعيف لضعف ليث، واختلف عليه فيه