1,281. Escorting the Deceased
198:7 If a person cries over the death of a righteous person, G-d counts the tears and metaphorically "stores them in His treasury." This is considered a rectification for certain sins and helps to protect one's young children from death, G-d forbid.
198:8 If a person sees a funeral procession and does not escort the deceased, he violates the prohibition against mocking the dead; such a person should be shunned. At the very least he should escort the deceased for four cubits (about six feet). In a case where one does not need to escort the deceased, as will be discussed in the next halacha, one must nevertheless stand before him. He isn't actually standing for the deceased but for those who are taking care of him, as they are engaged in a mitzvah. This law is true for any mitzvah in which a person might be engaged: one must stand before him. This was the case with the Jerusalem craftsmen: they would stand for those bringing their first fruits to the Temple.