Do you have to write one yourself, or are you looking for an example that is already written? Or, are you referring to the poem that Hamlet writes to Ophelia, which Polonius reads? I am guessing it is NOT the latter, because that poem is a love poem (sort of) and does not refer to any insanity.
There is a funny poem about Hamlet that is a parody of Green Eggs and Ham, by Dr. Suess, called Green Eggs and Hamlet:
Green Eggs and Hamle
Green Eggs and Hamlet
I ask to be or not to be.
That is the question I ask of me.
This sullied life, it makes me shudder.
My uncle's boffing dear sweet mother.
Would I, could I take me life?
Could I, should I end this strife?
Should I jump out of a plane?
Or throw myself before a train?
Should I from a cliff just leap?
(The entire section contains 435 words.)