Nameless forebodings crept upon him as he sat there in the dark: He tried to resist them, push them away, yet they came at him relentlessly. Neither can live while the other survives. (14.55)
From the beginning of the quest, Harry knows that his own death is a possibility – but now it seems almost like a likelihood. Here, we see his first thoughts on his fear of death and the unknown.
"'The last enemy that shall be destroyed is death'…" A horrible thought came to him, and with it a kind of panic. "Isn't that a Death Eater idea? Why is that there?"
"It doesn't mean defeating death in the way the Death Eaters mean it, Harry," said Hermione, her voice gentle. "It means… you know… living beyond death. Living after death."
But they were not living, thought Harry: they were gone. The empty words could not disguise the fact that his parents' moldering remains lay beneath snow and stone, indifferent, unknowing. (16.92)
Harry's fear of death is apparent here – it's the great unknown, after all, and there's no evidence given that there is life after death. To him, his parents' grave just bespeaks the silence, loneliness, and indifference of the great divide.
"When you say 'master of Death' –," said Ron.
"Master," said Xenophilius, waving an airy hand. "Conqueror. Vanquisher. Whatever term you prefer." (21.37)
This idea of the "master of Death" follows upon the notion we saw alluded to on Lily and James's gravestone – the idea that one might somehow trump Death or have supremacy over it. And it's fitting that Harry, the heir of the Peverell brothers, should assume that rightful title in the end.
"'The Tale of the Three Brothers' is a story," said Hermione firmly. "A story about how humans are frightened of death. If surviving was as simple as hiding under the Invisibility Cloak, we'd have everything we need already!" (22.6)
Hermione's kind of right – and mostly wrong, given the events of the rest of the book. Her point about humans' fear of death is right on, though; we'll do anything to talk around, above, and through death and the threat of it.
"No – no – no!" someone was shouting. "No! Fred! No!"
And Percy was shaking his brother, and Ron was kneeling beside them, and Fred's eyes stared without seeing, the ghost of his last laugh still etched upon his face. (31.187-188)
This is the worst death we've seen yet – Dobby was one thing, but Fred Weasley is another. For the first time since Sirius's death in Book 5, we witness the direct, immediate impact of death on those left behind.
Slowly, very slowly, he sat up and as he did so he felt more alive and more aware of his own living body than ever before. Why had he never appreciated what a miracle he was, brain and nerve and bounding heart? It would all be gone… or at least, he would be gone from it. (34.5)
The awareness of mortality makes Harry all the more aware of his own life – for, after all, he's taken it for granted until now, when it's all going to be taken away.
Terror washed over him as he lay on the floor, with that funeral drum pounding inside him. Would it hurt to die? All those times he had thought that it was about to happen and escaped, he had never really thought of the thing itself: His will to live had always been so much stronger than his fear of death. Yet it did not occur to him now to try and escape, to outrun Voldemort. It was over, he knew it, and all that was left was the thing itself: dying. (34.3)
Faced with inevitable death, Harry has to think about the experience of it for the first time – and it's scary. Even in his most dangerous moments, death has never seemed so real as now, when it's the only possible choice.
Finally, the truth. Lying with his face pressed into the dusty carpet of the office, Harry understood at last that he was not supposed to survive. His job was to walk calmly into Death's welcoming arms. Along the way, he was to dispose of Voldemort's remaining links to life, so that when at last he flung himself across Voldemort's path, and did not raise a wand to defend himself, the end would be clean, and the job that ought to have been done in Godric's Hollow would be finished: Neither would live, neither would survive. (34.1)
The truth about the Harry-Voldemort prophecy emerges – it's all been about death all along. While Harry had interpreted it as meaning only one of them would survive, it turns out that there's nothing at the end of this path but his own demise.
He had no strength left for a Patronus. He could no longer control his own trembling. It was not, after all, so easy to die. Every second he breathed, the smell of the grass, the cool air on his face, was so precious: To think that people had years and years, time to waste, so much time it dragged, and he was clinging to each second. At the same time he thought he would not be able to go on, and knew that he must. (34.36)
As he's about to go to his death, Harry longs only to live – and who wouldn't? Even though he's doing the right thing for the world, imagine being in his situation. When it comes down to your own life, even the best reasons couldn't possibly seem good enough to end it.
"You are the true master of death, because the true master does not seek to run away from Death. He accepts that he must die, and understands that there are far, far worse things in the living world than dying." (35.88)
Dumbledore explains the real meaning of "master of death" here – it doesn't mean that Harry commands Death, but rather that he's kind of on equal terms with it. Like the third brother in the story (his ancestor), he's willing to approach Death face-to-face when the time is right, and thus has a greater understanding of it… or, rather, has come to an understanding with it.