Resources for Moed Katan 29
1. The גמרא discusses the different ways a person experiences death: it is either easy (like a hair from butter) or difficult (like a stuck knot). See the מכתב מאליהו in חלק ג page 28-29 who explains that for צדיקים leaving this world is easy as their body doesn’t hold them back at all. They are connected to their soul while they are still alive. The highest level of this is מיתת נשיקה. The level below that he brings from the זוהר who says that the upper נשמה is revealed to the person and his lower נשמה connects to it completely and the person passes away. However, for רשעים, they have no connection to their נשמה at all. Consequently, when they leave their body and watch it rot it is incredibly painful for it.
2. The גמרא says that when you leave a live person you should say לך לשלום and when you leave a dead person you should say לך בשלום. See the תורה תמימה in פּרשת לך לך פּרק ט"ו פּסוק ט"ו who asks from several פּסוקים that seem to contradict this. For instance, it says by יעקב that “ושבתי בשלום אל בית אבי”, and by יתרו it says וכל העם הזה על מקומו יבא” “בשלום, as well as many other places in תנ"ך where “בשלום” is used in regard to the living and nothing bad happens. He says that he believes that the weight of these questions is what pushed the נימוקי יוסף to say here that our גמרא is just a ניחוש of sorts and that if you aren’t מקפּיד about it it won’t bother you. He also believes that this is why the ענין of לך בשלום vs. לך לשלום wasn’t brought by the פּוסקים except by the מגן אברהם in סימן ק"י since the ראשונים tried very hard to keep us away from anything that was close to ניחוש.