"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.