Hamlet - His Father's Death
I believe that Hamlet's tragedy stems from a number of origins. The obvious one is the death of his father. When the play opens the young man is deep in grief, to the extent that he wishes he were dead. 'O that this too sullied flesh would melt.' He would even consider suicide if God 'had not fixed his canon 'gainst self-slaughter'. Hamlet is a tragic figure from the moment the audience encounters him, dressed in 'solemn black' ~ 'thy nighted colour' as his mother calls it. He continues to talk reverently of his high regard for his late father throughout the play.
His Mother's Behaviour
The second cause of Hamlet's tragedy is his mother's behaviour. Instead of sharing her son's grief, and supporting him through it, she has remarried with indecent haste. He claims that 'a beast that wants discourse of reason would have mourn'd longer'. Indeed, she believes that Hamlet's melancholy is caused by 'his father's death and our o'er hasty marriage'. She has married a man for whom Hamlet has little regard and whom he compares very badly with his father. Furthermore, the new husband is her deceased husband's brother. Many, including Hamlet, would consider this to be an illegal and incestuous relationship. Hamlet is extremely disappointed and disgusted by his mother's actions and bemoans the 'incestuous sheets'.
His Villainous Uncle
The third cause concerns something that becomes known to Hamlet after the play opens ~ that his father did not die as the result of a snake-bite, but that he was murdered. His own brother, Hamlet's uncle, poisoned him ~ this was 'murder most foul, strange and unnatural'. It leaves Hamlet in a very difficult position. His king and step-father ~ Claudius ~ is also his father's killer, yet he can do little about it. It would be treason to lead a movement against him; it could lead to his own passage to the horrors of Hell or the 'sulph'rous and tormenting flames' of Purgatory if he were to kill him; he is guarded or with his mother at all times; he has been told of the murder by a ghost, who just might be a demon telling him lies. ~ as he says, 'a devil' which 'abuses me to damn me'.
His Father's Ghost
Yet he has promised the ghost of Old Hamlet that he will 'sweep ' to avenge him, and this is another cause of the tragedy ~ that his father's spirit has put him into the difficult and dangerous situation, which will result in Hamlet being the killer of a close royal relative, just as Claudius is, and going to Purgatory, just as his father has done.
Additional matters, including Polonius's interference and spying, contribute to Hamlet's tragedy. By keeping Ophelia away from Hamlet, Polonius causes Hamlet to become ever more cynical about, and suspicious of, the behaviour of women. Hamlet was already lacking the support of his mother during a very difficult time. By forcing Ophelia to refuse Hamlet's company, Polonius would have exacerbated his feelings of being unable to trust the women he loved. Then, by Polonius making Ophelia help him and Claudius to spy on Hamlet, it compounds this situation, causing Hamlet to ask Ophelia if she is honest.
Polonius further adds to Hamlet's tragedy by eavesdropping on his conversation with his mother. If Hamlet had not noticed his presence, and lashed out in emotion, Polonius would not have died, Ophelia would not have lost her sanity and Laertes would not have consented to a fencing match, where Hamlet could not help but die.
His Own Personality
Finally, Hamlet's own personality contributes to his tragedy. If he had been an impetuous youth, uncaring of conscience or the afterlife, who worried not about the morality of incest or adultery, and accepted that death was inevitable for his father, who, in turn, had 'lost a father, that father lost, lost his', so should not be the cause for concern, then he would not have suffered the tragedy that Shakespeare set before his audience.
The Most Important Cause
The most important cause, in my opinion, is the behaviour of Queen Gertrude. Hamlet would have known that, at some stage, his father was likely to die, and that he might then be elected king himself. At his father's death, with the support of his mother, he would have grieved until time eased his pain. As it was, by re-marrying so quickly, Gertrude showed no respect for her late husband, and no support for her distraught son. By committing adultery, as the ghost had implied, she had defiled her marriage, and by committing incest she was acting in a manner often considered immoral and illegal.
By celebrating marriage and enjoying sexual activity, while her husband's grave was still new and her son still in mourning, she was being thoughtless at the very least. This was something that Hamlet found even less bearable than his father's death. 'You are the queen' he chides her, 'your husband's brother's wife, and, would it were not so, you are my mother'. It was his mother's behaviour that made him wary of all women ~ thus affecting his relationship with Ophelia negatively. His mother's immoral behaviour may have been causing more emotional turmoil than his father's death. If she had spent more time with Hamlet and not remarried, then it is unlikely that Claudius would have been elected king, since she was 'jointress' Then vengeance would not have been so difficult to take, and Polonius would not have been involved in their personal affairs, so would not have been killed as a result of spying in the bedroom.
While Hamlet would have grieved his father's death, whatever had happened, and would have considered his death ~ particularly his murder ~ a tragedy, it was the thoughtless behaviour of his mother that was Hamlet's greatest tragedy.