Initially I thought it would be difficult to compare Shakespeare's Hamlet, in his play, Hamlet, and Arthur Miller's Willy Loman in Death of a Salesman.
First, I clearly see Hamlet as a tragic hero in the sense that he is a great man—not as some of Shakespeare's other heroes are: he is not a soldier or a king. However, he is deeply dedicated to his family, specifically his parents, and when he learns that his father has been murdered, his first concern is whether the Ghost who advises him is a demon bent on his spiritual destruction or an "honest" ghost. Once Hamlet can be certain of the truth of what the Ghost says, he plans to avenge his father's murder. Obtaining that proof is not that easy, as Claudius is "devoutly" committed to doing whatever it takes to keep the throne he murdered his brother to get. Finding the best time slows Hamlet down. Scholars usually agree that his tragic flaw is Hamlet's indecision (though I generally feel it is warranted). Hamlet dies because he does not kill his uncle before his uncle arranges for Hamlet's death. So I believe Hamlet is clearly a tragic hero based on Aristotle's definition.
At first glance, I did not see Willy Loman as a "typical" tragic hero. He is a man who is not in touch with reality—he lives a great deal in the past, spending a great deal of that time conversing with his dead brother, Ben. Willy Loman is not a traditional hero; he is not a great man. Life's disappointments have beaten him down; he does not have a good relationship with Biff because his son knows he had an extramarital affair, and Biff has not lived up to Willy's expectations. In fact, life has generally been a major source of discontent and frustration for Willy, and so he plans to kill himself (and eventually succeeds).
When Willy's "dead" brother Ben tells Willy that suicide is the coward's way out, Willy responds, explaining that it takes a lot of guts to commit suicide in order to make one's family's life better (leaving behind an insurance policy). In this modern context, some might see Willy as a tragic hero. Willy tells Ben:
...Does it take more guts to stand here the rest of my life ringing up a zero? ... And twenty thousand—that is something one can feel with the hand, it is there.
If Willy has a fatal flaw, it would probably be his inability to deal with the reality. The fact that he is not the man in reality that he is in his imaginings, drives Willy toward suicide. Some critics do, however, see Loman as a tragic hero:
...his tragedy lies in his belief in an illusory American Dream.
Moving on, Hamlet is a man of royal birth, son to King Hamlet; Willy is not.
"Hubris" it is defined as:
...excessive pride or self-confidence; arrogance
This is something I believe Willy and Hamlet clearly do have in common: neither suffers from hubris. Some of Shakespeare's other characters do have this character flaw, but I do not believe Hamlet does, as he struggles with uncertain to prove his uncle guilty of murdering Old Hamlet. Willy, also, hardly seems to to display real self-confidence. He is a man who desperately wants to reach a certain level of success in his job and his life, especially for his family, but the confidence he displays is empty—wishful thinking. He may say he is the best salesman the company has, but he is living in the past—when he was younger, worked for his boss's father, and was appreciated more.
Strangely, Hamlet and Willy do have some common problems.