We've had various staff changes over the years, sometimes it's been us, sometimes others. One thing I have learned is that there are 2 ways to go out. You can burn your bridges or you can keep them intact. My goal is always to have a parting end with a bridge intact.
When you are the one being left I think the most important thing to remember is that your ultimate desire for your friends should be that they are happy and successful. One thing we repeat OFTEN is we came as an act of obedience and we will leave as an act of obedience. We have no desire what that act will look like, but we know our desire is to have Jesus front and center.
When you are the one leaving I think the most important thing to remember is that you are leaving, so you no longer get a say. You need to focus on where you are going, clean break, yet still being available for anyone needing to resource you. You need to be 100% present at your new institution, they deserve it. Friendships don't need to be severed, but they do need to take on a purely encouraging role unless otherwise requested.
Of course this is my opinion, experienced opinion :)