My third year of college, a girl who lived in my dorm committed suicide. They gathered us all together in the house lounge for an emergency meeting and the Dean of Students or the Dean of the College informed us that she had been found dead in her room. Coincidentally, the room where she was found was the room where I had lived my first year. I knew this girl because I was an Orientation aide when she was a first-year and I was a second-year and because she was a friend. In some way, though, in the time immediately following her death she became a closer friend in my mind than she really had been.
No matter how close or distant from you the person who died is and no matter how expected or unexpected the death is, there's a sort of pall of mortality that decends over the lives of everyone who was even acquainted with the deceased. But there are some lessons here, maybe even some positives. First, some things are more important than others. Sometimes the fog of grief actually lets you see your priorities more clearly. Futhermore, living through today's grief can help you live and function through the grief that may come in the future. In being thus prepared, you can be in a better position to help others who grieve with you.
Going a bit further back, I made a friend in late middle school/early high school who found out she had leukemia probably just a few weeks or months after I met her. I knew for most of the time she was my friend that there was a good chance that she would die soon, and then she did. I went to her funeral and was a pall bearer. I am grateful to have known her, not the least reason being that she introduced me to death in just about the gentlest possible way.