Roger Federer has returned from hell twice this week, yet he is still smiling, refusing to panic, and says: “I believe until the end.” Even the 38‑year‑old Swiss does not know when that dreaded moment will arrive but he remains convinced, against growing evidence, there is a little piece of heaven waiting for him here on Sunday.

He no doubt kept an eye on Rafael Nadal’s dramatic quarter-final against Dominic Thiem because, if he were somehow to beat Novak Djokovic in their semi-final on Thursday evening, he would be playing the winner or Alexander Zverev in the final.

Was he relieved to see the 34-year-old Nadal, the world No 1, lose? Possibly. Or should he fear the vigour and ambition of either Thiem or Zverev, who earlier beat his old friend Stan Wawrinka?

These tremors and uncertainties will rumble and multiply in the months to come. It is inevitable. But whisper it to the trio who own 55 majors between them, stretching back 17 years, a dominance like few others in any sport.

Federer knows he could have lost against John Millman; perhaps he should have lost against Tennys Sandgren. Nevertheless, to win his 21st major the six-time champion will have to go through the man who has turned the screws on his genius more often in recent years than anyone in the game and who, last summer at Wimbledon, inflicted a searing defeat on him. It was the Serb’s 26th triumph in their 49-match rivalry – and his 20th from their past 30, including a walkover – when he saved two match points to move within four slam victories of Federer’s record tally.

How, we wondered, could he recover from that to remain in contention here? A subsequent victory against Djokovic at the ATP World Tour Finals helped, he acknowledged.

“It showed me he is beatable,” Federer said. “If I play my game, I have to do several things well. But I hope it is the same thing for players against me, and Rafa [Nadal] as well. You cannot just serve well, you cannot just play well from the back of the court. You need to have mixed skills and he is one of these players who are like that. It does me good to know that, at my age, I can prove, from time to time, that I can beat Rafa and Novak and win tournaments. The challenge in five sets is bigger. You have to do even more good things for longer. But I have played so many matches that obviously I believe. I believe until the end.”

Novak Djokovic in full flight in his quarter-final win over Milos Raonic. Photograph: Quinn Rooney/Getty Images

They all believe. They would be skiing in Switzerland if they didn’t. Or fishing in Mallorca.

And, whether Zverev wins the title or not, whether or not he even gets to the final, the 22-year-old German has already won Australia. The son of parents who grew up in the Soviet Union lives in the tax haven of Monte Carlo and has earned more than $US20m in his short career. And he is standing by his pre-tournament promise to donate his entire $A4.12m purse to bushfire relief if he finally becomes a grand slam champion on Sunday; that is a gesture of rare magnanimity in modern professional sport.

“Of course, if I win the $4m, it’s a lot of money for me,” he said after his excellent four-set win against the 2014 champion. “I’m not Roger, I’m not LeBron James. This is still big. But, at the same time, I know there are people right now in this country, in this beautiful country, who lost their homes and they need the money. They depend on it, building their homes again, building up the nature that Australia has, the animals as well. I think there’s much better use for those people with that money than I have right now.”

Whatever cynicism attaches to his decision to decline playing for his country in the Davis Cup Finals last November, then embarking on a lucrative exhibition tour with Federer, Zverev is going to “pony up” in Melbourne, and a bit of sentimental history is there for the taking if he backs his generosity with the sort of tennis that has made him one of the most exciting young players on the Tour.

Twice in the first two hours of the evening quarter-final, Nadal led Thiem 4-2. Twice he squandered the advantage. And, uncharacteristically, he lost his temper with the officials when given a time violation for slow serving in the second set. He had bounced back three times from 2-0 down, and raised his level appreciably to stay in the tournament, but he could not sustain it in the fourth set, when his stamina looked to leave him. A break up, Thiem wobbled at the end.

As Kyrgios did two nights previously, Thiem wobbled in sight of the line, a double fault and three unforced errors letting Nadal back in the conversation at 5-all. As the clocked ticked past four hours, they went to a third tie-break – Thiem’s fifth of the tournament, Nadal’s sixth. The younger man, trembled again on the first of three match points, serving, but prevailed (aided by the net), 7-6 (3), 7-6 (4), 6-4, 7-6 (6). There were a lot of stories in Nadal’s closing, weary forehand into the net.

Thiem’s battle with Zverev on Friday will be engrossing, a pointer to the future, with no clear favourite – and still it will not hold the history of Federer versus Djokovic.