“A funeral has passed by the Prophet (ﷺ) and he stood up and said: ‘Stand up out of recognition of the enormity of death.’”
Sunan Ibn Majah Book 6, Hadith 111