Don't put it off. The longer you leave it, the harder it will get and the greater the chances the other person will hear the bad news on the grapevine, making the talk more difficult.
Create the right environment. Find a quiet place where you won't be disturbed and leave plenty of time. You don't want to be called away in the middle of a difficult conversation.
Be prepared. Think about all the questions you might be asked and the answers that you'll give before you start the conversation. Be absolutely clear on the facts.
Give all the facts upfront. That's important for putting everyone on an equal footing. Talking around the subject doesn't help anyone, and drip-feeding information only extends the agony.
Listen and stay calm. Allow time for the other person to ask questions and encourage them to share their views. It is more likely that they are angry with the situation rather than with you.
Empathise with how they feel. If you show that you understand their emotional reaction they will find it easier to listen to the facts and talk openly with you.
Don't accept their reaction at face value. People often minimise bad news, claiming that it doesn't matter or that they aren't surprised. Continue the conversation, showing your surprise at their reaction and sharing with them how you would have felt.
Discuss all the options. This will increase the chances of choosing the right route rather than leaping on the first, most obvious one. Then agree on a specific path of action and when you will talk again.
Emphasise their strengths as a person. We often extrapolate from a specific piece of bad news an attack on ourself as a person. Differentiate between the specific circumstances that have caused the situation and your faith in them as an individual.