1,362. Excessive Mourning
214:3 If the mourner's son needs to be circumcised, the mourner may go to the shul even during the first three days of shiva (when the mourning is most intense). If the mourner is the sandek (the one who holds the baby during the bris) or the mohel, he may not go out during the first three days. After those three days, he should daven at home and go to shul when the baby is brought there. If he is the only mohel in town, he may go even on the first day.
215:1 One should not grieve excessively over the dead as per Jeremiah 22:10, "Neither weep for the dead, not bemoan him." The Sages said (Moed Katan 27b) that one can't say that it means not to weep at all, so it must mean not to weep excessively and not to grieve more than the prescribed amount How long is this? It's three days of crying, seven days of eulogizing, and thirty days without freshly-laundered clothes and haircuts, as we have discussed. After that, G-d says, "Do you think that you have more mercy for the deceased than I?"
The Sages said, "Whoever mourns excessively for the dead will cry over another death." All this was said about mourning for regular people but a Torah scholar is mourned according to his greatness. In any case one does not mourn for a scholar more than thirty days because he was certainly not greater than Moshe, about whom it was written "they cried for Moshe thirty days" (Deuteronomy 34:8).