GEMARA - ELABORATION ON THE MISHNAH'S ASSERTION THAT ONLY RELATIVES DO KERI'AH
Question: The Mishnah says that only relatives do Keri'ah, etc. But there is a Beraisa that says that when a rabbi dies everyone does Keri'ah, baring of the shoulder, and the eating of the mourner's meal.
Answer: The Mishnah is talking about ordinary people, not rabbis.
Question: The Mishnah says that only relatives do Keri'ah. But there is a Beraisa that one shoud weep and mourn over any decent fellow.
Answer: The Mishnah is talking about all people, not specifically decent ones.
Question: The Mishnah says that only relatives do Keri'ah. But there is a Beraisa that says that anyone who is present at the time of death of any Jew must do Keri'ah, for it is not worse than seeing a Sefer Torah destroyed (see below, 26a).
Answer: The Mishnah is not dealing with the case of someone who is present at the time of death.
STORIES ABOUT RABBIS WHO DIED, AND RELEVANT LESSONS
Rav Safra died. Lessons:
Not only your rabbi, but any rabbi, requires Keri'ah
The Keri'ah need not be done at the time of death, but all throughout the period of eulogies.
It should not be done except while attending the eulogy.
R. Huna died. Lessons:
It is not proper to put a Sefer Torah on the bier, just as one should not sit on the same bed as a Sefer Torah while he is alive.
If the rabbi's bier doesn't fit through the door, one should not pass it out through the roof (it's disrespectful), nor should he move the deceased to a new bier. The doorway must be widened.
When a body is brought from another, faraway place, if the body is intact it is accorded full honors (Shurah, Bircas Aveilim, consolation visits). If it is not intact, it is not accorded these honors.
R. Chisda died. Lessons:
The Keri'ah made for a rabbi may be basted immediately after turning back from the bier.
There are also stories about the death of Rabah bar Huna and Rav Hamnuna, describing the eulogy made over them, and about the death of Ravina and his eulogy. There is a story about R. Ashi who took offense at a eulogizer who gave him a preview of what he would say about him.
Then there is the story about Rava and the prayer he requested Bar Avin to say at the Tigris River.
Then comes the story of the tragic death of R. Chanin on the day his firstborn son was born, and the eulogy said for him.
Then comes the story of R. Yochanan death and his eulogy. Lesson:
One does not observe Shiv'ah or Shloshim for a rebbi, even if it is his main rebbi.
Then comes the story about R. Zeira's death and eulogy.
Then the Gemara lists several rabbis who died and the supernatural phenomena that occurred as a reaction to their deaths. (Metaphors, perhaps - Meiri.)