You might use this quote to explore the way Hamlet thinks. The quote occurs in Act 2, scene 2 when Hamlet is talking with Rosencrantz and Guildenstern, who have been sent to spy on him. The quote is key to understanding Hamlet's character as well as some of the major themes in the play.
For an essay, you might address the idealistic view of mankind expressed in the quotation. It defines man as a magnificent machine, able to perform wondrous acts. Yet, the purpose of this machine is not clear. Hamlet questions the use of such gloriousness:
And yet to me what is this quintessence of dust?
Is the machine to be used to plot and kill a brother, as did Claudius? Is it to be used to plot revenge for the murder of a father, as is Hamlet's mission? What purpose fits the beauty of the machine?
Here is the question that plagues Hamlet throughout the play. What is man's purpose? And what is Hamlet's purpose in particular? And suppose there is no true purpose--that man is artfully created, only to become dust once more. These questions are echoed throughout the play, as Hamlet talks to Claudius in Act 4 about the cycle of life--how a beggar can progress through the guts of a king, and later in Act 5, when he addresses Yorick's skull in the graveyard.
These questions also are tied to the action versus inaction theme that occurs throughout Hamlet's soliloquies. In his "O what a rogue and peasant slave am I" soliloquy in Act 2, for example, Hamlet berates himself for his lack of action. Yet, in the context of your quote, we can see Hamlet's questioning in a somewhat different light. Perhaps at the bottom of Hamlet's exasperation is the true question: is this action worth the price? Is any action worth the sacrifice of a human life? And, does human life itself hold any true purpose at all?
The play is quite bleak and dramatically reflects many of the great philosophers' questions. In fact, it seems to have a decidedly existential focus.
And to complicate matters further, this speech is delivered in prose rather than verse. Hamlet uses prose when he is pretending to be insane. So, are we to take the quotation seriously? I think so.
I hope these give you some ideas for your essay.
"Oh what a piece of work is man" is one of Shakespeare's most famous speeches in Hamlet, and perhaps in all of his works.
The quote is very much in keeping with his realization that the world is not what it seems at first glance. In a way, Hamlet is forced to grow up here. He has led a happy life with his parents, gone off to school, and has (as far as we know) had no need to deal with the seedy side of life. That is until he is confronted by his mother's "incestuous" marriage to his Uncle Claudius, and then Old Hamlet's ghost, demanding that his murder at his brother's hands be avenged.
The speech in question is given by Hamlet, speaking to Rosencrantz, the King's "spy," and there is scholarly debate of exactly what Hamlet is saying. However, I take it at face value, and it speaks clearly to me in this fashion.
Hamlet is melancholy and distraught: he has lost his father, his mother is remarried under questionable [incestuous] circumstances according to Elizabethan times, and Ophelia side with her father and King (though what are her choices) rather than her sweetheart. Having having lost all the comforts of his former life and tenets of faith regarding that life, Hamlet has lost faith in mankind.
Up until now, when Hamlet has measured man, he has thought of God: in essence, the idea that man is made in the image of God—he is a piece of beautiful art work, able to reason (so superior to the animals...and yet...); man's ability to move might remind him of a dancer: in his actions, Hamlet compares man to an angel, another Heavenly being. And man's understanding ("apprehension") is god-like.
The change in this line of thought is found in the transitional/pivotal phrase, "and yet." It is here that we sense the cold dash of reality that has changed Hamlet's mind...
For all of man's "trappings," man (to Hamlet) is simply that from which he has come and will return:
...what is this quintessence of dust?
His heart has been so damaged by what he now knows, that God's miracle of mankind brings no pleasure to Hamlet: as if he has been betrayed and can see nothing good in man.
I am not certain exactly what the intent of your essay is. If it is a personal response, you might tie it to a situation where you have felt blinded to the goodness of humanity by what it does: war, disease, murder, dishonesty, harm to animals and children, etc.
If your essay is more philosophical in nature, it certainly mimics the rite of passage that people experience as they mature. Sometimes it takes place culturally: the bar mitzvah, getting a driver's license, turning twenty-one, etc.
However, if it is about Hamlet, all I can see is his deep devastation over the awakening he faces in light of the world he once knew, and the one he sees before him. His only friend is Horatio, though before he felt grounded in the love of his parents and a romance with Ophelia. Where life presented opportunities for entertainment to the heir to Denmark's throne, Hamlet is now (with good reason) suspicious and alone.
On a personal note, I would identify with his speech in comparison to an equally enlightening, painful experience about life, or I would concentrate on Hamlet's loss of faith in mankind. Much of what he says after learning about his father's murder is an act to throw off Claudius and his "minions." However, there are glimmers of heartache that Hamlet's character confronts, and I believe that in this speech, he is speaking from his heart.