In Shakespeare's Hamlet, the Prince of Denmark demonstrates the best and worst of human nature.
The best of Hamlet is seen in his love for his parents. His father's sudden death devastates Hamlet. He remembers his parents' dedication and love for each other; and we sense that their family was very close.
When the ghost of Old Hamlet appears, Hamlet worries that the ghost may have been sent by the devil to trick him into killing Claudius, and thereby losing his soul. However, while he struggles with this possibility, his love for his father demands that he promise to avenge Old Hamlet's death.
When Laertes tries to murder Hamlet at the end, having been misled by Claudius, Laertes asks for Hamlet's forgiveness just before he dies, and Hamlet, knowing he has been poisoned as well, graciously offers his forgiveness to Laertes before he dies.
In these ways we see the best of Hamlet.
However, the young Danish prince is haunted and driven by outside forces and his own self-doubts. Hamlet blames his mother for marrying her uncle so soon after his father's death. Realistically, an widowed woman, even a queen, could only hope for the king's successor to be generous regarding her future and her survival. Hamlet thinks nothing of this.
Hamlet decides to pretend to be mad to figure out if Claudius is guilty of murdering Old Hamlet or not. Under this pretense, he is extremely rude to Polonius, Ophelia and Rosencrantz and Guildenstern. Some might argue that Polonius is a busy body who talks too much. Ophelia seems to be spying for the King. And Rosencrantz and Guildenstern appear to sell their integrity to be favored by the King.
On the other hand, Polonius is an old man who has been allowed to stay on as the new King's advisor. Ophelia has little choice but to follow the dictates of father and King. She walks a fine line of trying to be supportive of Hamlet while doing what has been asked of her, in spying on Hamlet. Rosencrantz and Guildenstern may have taken up with the King, but they are unimportant enough within the kingdom to realize that they must support the King or lose his favor, which might well cost them their lives.
While it is easy to see how Hamlet could be disgusted with these people, he is the Prince of Denmark; his behavior does not display his finest moments in being a noble son of a noble house.
Hamlet is excessively cruel to Ophelia. She is one of the true victims of Claudius' machinations. Ophelia has no choice but to follow the directions given to her by her father and the King. However, it seems she still loves Hamlet and worries about him. Meanwhile, Hamlet becomes so disillusioned with the world around him, most especially with Claudius and Gertrude, that he loses the gentle heart we can assume he shared with Ophelia in the beginning of their relationship.
It is in this instance that Hamlet shows the worst side of human nature. He turns his sweetheart away, telling her he no longer loves her. And even then, he still taunts and insults her, as seen at the play-within-a-play, Mousetrap. And after he mistakenly kills her father, the nobler side of Hamlet should have been able to reach out to her in some way to comfort her, but he loses sight of his own humanity. This drives Ophelia mad, and she eventually drowns.
Shakespeare intends to show us the conflicted nature of our hero in this tragedy, and in doing so, we see human nature at its best and at its worst.