"Melancholy" is a formal, serious word that means "sad, gloomy, and hopeless." If you feel melancholy, or if you have melancholy, you're in a serious, thoughtful mood, and you feel a deep, terrible sadness. It's as if there's a darkness in your heart or your mind.
A melancholy day seems long, dark, sad, and hopeless. Melancholy music is slow, quiet, and sad. And a melancholy sight—like the sight of a thin, hungry cat sniffing around a dirty garbage can—fills you with deep sadness.