Hamlet certainly gives much evidence of energy in his sharp and witty sallies, in his obvious interest in the art of the traveling actors, in his dramatic recitation of the speech on Pyrrhus, in his clever arrangement of the play scene to trap Claudius, and in the way he engineered the demise of Rosencrantz and Guildenstern. These actions are hardly characteristic of depression. Also, most of these energetic actions are rationally motivated and some even carefully schemed out. If Hamlet is capable of carrying out such actions, he is certainly capable of exacting revenge on his uncle. So if Shakespeare intends melancholy to be the reason for Hamlet's delay, he certainly does a bad job of portraying it; furthermore, he really has no message at all to deliver in the play.
Hamlet tellsthe queen not to dismiss what he has said about her as the result of madness, and says how ironic it is thatvirtue (his blunt talk to his mother) has to ask pardon forits bad manners.
on whether Hamlet has a "tragic flaw." I believe thatthe whole "there has to be a tragic flaw" business was dreamed up by, who gotpaid to tell young people that if they were really good, thenbad things couldn't happen to them, and that people went tosad shows just to have a good cry ("purge the emotions of pity and fear").