The Obligation to Mourn
There is a Biblical obligation for a bereaved person to mourn for his deceased relative. This is easily inferred from Leviticus 21:2-3, which describes the seven relatives for whom a kohein (priest) may render himself ritually impure:
“…except for his close relative, his mother, his father, his son, his daughter, his brother; and for his unmarried sister…”
This is actually seven relatives: mother, father, son, daughter, brother and sister are six but the words “his close relative” include his wife. (See Rashi on Leviticus 21:2, citing the Sifra.)
It’s not just that a kohein may render himself impure for a close family member, he actually should do so. The Talmud in Zevachim (100a) relates that a certain kohein lost his wife on the day before Passover, which is by far the busiest day in the Temple! This kohein didn’t want shirk his responsibilities by becoming impure for her but the other kohanim compelled him to do so.
The reason a kohein actively should become impure for his close relatives is because everyone – kohein and non-kohein alike – has an obligation to mourn the passing of their seven closest relatives: mother, father, sister, brother, son, daughter and spouse.
According to the Sefer HaChinuch, the reason for the mitzvah to mourn is because a person’s heart and mind are drawn after his actions. After the death of a close relative, the Torah requires us to mourn in a certain fashion so that we will deal with our grief and focus on what’s truly important. Without a proper mourning mechanism, people can act out in any number of ways. We have therefore been given a constructive manner of dealing with such painful situations.