In the 18th century, "melancholy" meant not just "sadness" but a state of mind in which one understands that one's life is brief and sometimes hard, but it still is worth living. The person being described here would have been both glad and sad at the experience of living. Melancholy is personified as a goddess who "mark[s]" certain individuals.