Certainly if Hamlet were to go straightway and kill King Claudius, he may well have gone on to live a full and happy life. Of course, as many critics have pointed out, we wouldn't have had much of a play then. What then was it about Hamlet that casused his own downfall and lead to the tragedy that so many were involved in?
Hamlet, himself, (in Act 1, scene 4) alludes to that fault in one's character that can bring about one's own ruin:
So, oft it chances in particular men,
That for some vicious mole of nature in them,
As in their birth—wherein they are not guilty,
Since nature cannot choose his origin—
By the o'ergrowth of some complexion,
Oft breaking down the pales and forts of reason,
Or by some habit that too much o'erleavens
The form of plausive manners, that these men—
Carrying, I say, the stamp of one defect,
Being nature's livery, or fortune's star—
Their virtues else—be they as pure as grace,
As infinite as man may undergo—
Shall in the general censure take corruption
From that particular fault. The dram of evil
Doth all the noble substance of a doubt
To his own scandal.
So, what is Hamlet's vicious mole? What is his "tragic flaw" the "chink in his moral armor?"
I think it's his intelligence. He's so smart that he's stupid. He thinks so much, looks at so many facets and possibilities of the truth, that he thinks (and talks) far more than he acts. And yes, he has lots to think about: the ghost, his mother, his uncle, his girlfriend, revenge, life and death.
He knows well enough that too much thinking is not a good thing (Act 3, scene 1):
Thus conscience does make cowards of us all,
And thus the native hue of resolution
Is sicklied o'er with the pale cast of thought,
And enterprises of great pitch and moment
With this regard their currents turn awry
And lose the name of action.
Hamlet uses his intelligence to plan and carry out the perfect revenge for the father he loves so much. He wants to punish Claudius, make him feel afraid and guilty before he kills him. This is all well and good, but, no matter how well thought out this perfect revenge is, it takes much too long and involves too many relatively innocent people. And time is Hamlet's enemy; for in its span, Claudius can formulate his own nefarious plans.
When it comes to killing and avenging a suffering ghost, a dagger in the heart of King Claudius would have sufficed and would have saved time and many lives... all but one.