I have just had a cup of coffee. This means that I'm not drinking coffee at the moment. But if someone asks me how I'm feeling, I might say that I've just had a coffee, because that's a description of my current state.
Now, I never smoke when I'm having a coffee. I hate the way that smoking makes my coffee taste - the coffee tastes disgusting. But after I've had a coffee, I always have a strong urge to have a cigarette. I don't want to have a cigarette when I'm smoking, but I always want to have a cigarette after I've had a coffee.
So I could phrase the situation above like this:
- When I have a coffee, I want to have a cigarette. (not good)
The problem here is that the sentence sounds like it's describing me wanting to have a cigarette while I'm drinking my coffee. I really want to describe the situation that I'm in when I've already had my coffee. I can use the present perfect to do this:
- When I have had a coffee, I always want to have a cigarette.
This sentence is better, because it says that when I am in an I've had a cigarette situation, I want to have a coffee. Notice that this sentence isn't about the past. It isn't about right now. It is referring to general time. It means I always want a cigarette in I've had a coffee situations.
Now consider the speaker in the Original Poster's example. They often have to give patients bad news. If you phone them up up one day and ask them how they are, they might say I have had to give a patient bad news. They're using the present perfect here because the giving bad news action is finished, but the phrase have had to give a patient bad news tells you something about their present situation.
Now this writer regularly has to give patients bad news. After he tells them the bad news, he often thinks a lot about whether he gave the news in a bad way. Maybe he worries about this for a few hours or maybe a few days. When he thinks about it, he never knows if he gave them the news in a good way or not.
The writer does not say that he thinks about it when he has to give them the news. He thinks about it afterwards when he is in an I've recently had to give someone bad news situation. To show this the writer uses a present perfect:
- When I've had to break bad news ...
This sentence isn't about the past, it's about every time that he is in a situation where he has just given someone bad news - now, in the past and in the future. What happens when he is thinking about whether he broke the news well or badly? He says:
... I never know whether I have done it well or not.
Here he uses the present simple to indicate it is always how he feels in this post-breaking bad news situation.
The anchor time, the time the author is speaking about, is the time after he has had to break the bad news. He doesn't use a present simple to describe this, because the breaking bad news always happens just before this time. He uses the present simple for the second clause because it describes the mental state he always has during this anchor time, the post-breaking bad news situation.
In my opinion, the writer could make the sentence clearer by changing a few words. They could use whenever instead of when. This would help us understand that this might be a recurring situation. Secondly, the writer could use the word recently or just. This would reinforce that the present perfect is being used to show the anteriority (earlier-ness) of the breaking news event:
Whenever I've just had to break bad news to someone, I never know whether I've done it well or not.