How to turn a departure into a leadership opportunity.