There is a related discussion topic which you might find useful as well, it's linked below.
I would simply add to this excellent answer that Hamlet has a good reason for being undecided, at least in the earlier part of the play: his chief source of information is a ghost, and he has no way of checking its credentials. The ghost might be the spirit of his father, or it might be a demon sent from Hell to deceive him. Even if it is the former, blood revenge is emphatically not a New Testament Christian value, and so the right of the ghost to command that Hamlet kill its murderer is in question.
From this perspective, we might say that Hamlet is a tragedy because the protagonist has no available course of action that produces morally unambiguous results. The "tragic flaw" is not so much his indecision as his inability to access enough reliable information to make a good decision, combined with the moral imperative he do something about the situation. If he kills Claudius at once, he may be acting under demonic deception and damning himself. If he tries to gather further information, as he does, his actions may spiral out of control (as they do), resulting in the deaths of many others (Laertes, Polonius, Ophelia, and his mother to begin with). No wonder the poor fellow considers suicide.
Aristotle's Poetics outlined the qualities of the tragic hero that we still refer to today:
- The tragic hero has a noble stature and a high position in his culture.
- The tragic hero, is great, but not perfect. The audience relates to him as a human being.
- The hero's downfall is the result of a "fatal flaw" in his character. It is the result of free will, not of an accident or mere fate.
- The hero's misfortune is not wholly deserved. The punishment exceeds the "crime."
- The hero's fall is not pure loss. The is an increase in awareness, a gain in self-knowledge, or some sort of discovery on the part of the tragic hero.
- Though it arouses solemn emotion, tragedy does not leave its audience in a state of depression. Aristotle argues that one function of tragedy is to arouse the "unhealthy" emotions of pity and fear and through a catharsis (which comes from watching the tragic hero's terrible fate) cleanse us of those emotions.
Hamlet, of course, is a prince and therefore of high status. Critics generally agree that his "tragic flaw" is indecision, as he cannot bring himself to avenge his father's death in a timely manner.
He is powerful, fierce, and has great leadership qualities. He is willing to step up to what he needs to do to stick up for his father. He is willing to lose all he loves to do what is right at the time.