Very clever song: "Cheer Up, Hamlet," from the Canadian tv series Slings & Arrows. According to this page the lyrics are by Lisa Lambert and Bob Martin, the music by Greg Morrison; "the trio would later team with Don McKellar to create 'The Drowsy Chaperone' for Broadway."
Cheer up, Hamlet
Chin up, Hamlet
Buck up, you melancholy Dane
So your uncle is a cad who murdered Dad and married Mum
That's really no excuse to be as glum as you've become
So wise up, Hamlet
Rise up, Hamlet
Perk up and sing a new refrain
Your incessant monologizing fills the castle with ennui
Your antic disposition is embarrassing to see
And by the way, you sulky brat, the answer is "To be"
You're driving poor Ophelia insane
So shut up, you rogue and peasant
Grow up, it's most unpleasant
Cheer up, you melancholy Dane