Hamletdoes hamlet ever achieve harmony ?
I think he achieves a great measure of harmony even earlier than the final scene of the play. When he is talking to Horatio in early Act 5 he tells him that he finally realizes that "there is a divinity that shapes our ends, rough hew them how we will." He realizes that there is only so much of his life that he can control and after that, all he can do is react as best he can. There is a harmony in that realization. There is a harmony between control and lack of control that actually frees Hamlet, intellectually, to do what he needs to do to avenge his father's death.
When we meet Hamlet his life is in turmoil and his spirit is melancholy. Throughtout the course of the play, those two things remain consistent, though we do see several moments of light in his darkness. At the end of his life, Hamlet does have a moment of satisfaction when he avenges his father's death, but the moment is short-lived. He has lost the two women he loved, and there is nothing harmonious in that. It seems the only moment of harmony is when Hamlet makes peace with Laertes, when two friends ask for and offer forgiveness.
Once Hamlet resolves in his own mind to trust the authenticity of the identity of the ghost and to accept his charge of avenging the wrongs committed by his uncle, Hamlet does attain some harmony. At his death this harmony increases since he can die knowing he did what was needed, and he can rely on his Protestant faith to carry him to spiritual peace. It is paramount that his injunction and actions match his Protestant beliefs, and only when these come into accord can Hamlet know harmony.
I agree that Hamlet received harmony as he was dying. His goal to avenge his father's death had been met and he died in peace, knowing that his father's memory had been honored. Also, in his dying breaths, he is making arrangements for the next king. He is putting things in order as he is dying. He names Fortinbras as the next king. While dying, he is setting things in order for the sake of the throne. Some of Hamlet's last words are "he has my dying vote."
Hamlet may be at peace and have achieved harmony once he has avenged his father's murder, but as he was instructed not to harm Gertrude, and she dies by unwittingly taking the poisn meant for her son, perhaps it is not so harmonious. Also, as he has killed Polonius earlier in the play, and was instrumental in Ophelia's suicide, it is likely that harmony was something much in the past for Hamlet.
I think it can be argued that Hamlet did finally achieve harmony just before dying. He is able to avenge his father finally and also seems to acheive a measure of inner peace before he dies. Even though the final scene is somewhat catastrophic in terms of the body count, I think Hamlet, in his dying words, realises he is achieving the peace that has eluded him during the course of the play.
No, I do not think he ever does achieve harmony. He never really manages to make "peace" between his desire to avenge his father and his own psychological tendencies. He does, of course, eventually bring himself to act. Even so, he seems conflicted even as he finally does act. This seems to me to be characteristic of someone who never did achieve "harmony."
If by harmony you mean sanity, perhaps. If you are asking if he ever makes up his mind and acts, he does. It is a difficult decision for him to decide whether or not he really saw his father's ghost or it was a hallucination or dream. He ultimately realizes that he is seeing the truth, and he is the only one who can act.