Indeed,
But also, in moments like the one you described with your friend, I like to remind myself that this is one big school, maybe your friend had several events that he needed to go through in order to learn something very specific for himself, something that included an early departure.
But also, sometimes it is also part of our own lessons to witness someone we care about go through difficult times, and experience the frustration and grief that abounds when they won't heed our advice, when we dispense what we think it's the best piece of advice for someone.
In such instances, while remaining objective about it, and having a semi detached outlook on the situation, also experience whatever it is you're experiencing, allow yourself to feel the frustration and grief, it's only natural, but don't become those feelings. But eventually, take that a step further and honor him by reminding yourself of what you wrote above.
You cared about him enough not to want to see him gone, and you miss his presence in your life, but you can honor him by realizing he had his own path and accepting that peacefully, even if that peace includes sadness.
Who knows what is best with someone going through a difficult time, different people take different approaches differently, some people take different approaches differently in different points of their lives, sometimes a gentle approach is more effective, sometimes a harsh one is, sometimes a combination of both, sometimes a humorous one does the trick.
I think that we can only do our best, sincerely and respectfully and then allow them to choose. But sometimes, specially when it is someone not directly related to us, the best thing we can do is behave and live in a way that may inspire someone who may be looking for such inspiration.