We all get hurt sometimes. We also knowingly hurt others, at some point or the other. For example when we break up with someone because we are “over” them, or it’s just not working for us. Or when we fire somebody who is a great person but just not right for the job.
Now, we may not be able to control causing hurt, but the important thing is that while doing so, we do it as gently and kindly as possible. Be compassionate, praise the person for all the good things they have done. Offer an honest explanation so they can have closure. Apologise if needed. If the situation is conducive to maintaining contact, offer help in any way possible. Most importantly, be decent. Don’t get defensive, obnoxious, break the other person's confidence or useful things they have shared in confidence with you.