POLONIUS: My honourable lord, I will most humbly take my leave of you.
HAMLET: You cannot, sir, take from me anything that I will more willingly part withal; except my life, except my life, except my life.

– William Shakespeare

Hamlet, Act 2, Scene 2. Hamlet is saying here he would be fine being free from Polonius and even more fine being free from his own life. This is essentially a suicidal thought and shows Hamlet’s melancholia.