Lyrics come from the head and music comes from the soul, but they both have the same task – to create emotion. The trick is to make sure both are evoking the same emotion.
If you’re writing lyrics to music you need to be sure you aren’t subverting the composer’s intentions in order to accommodate your lyrics. Similarly, if you’re writing music to lyrics it’s important to recognise the emotion those lyrics evoke and compose appropriately. A dirge-like melody is not going to sit happily with words of a glorious spring and budding romance, and a happy floating melody shouldn’t be dragged down by funereal lyrics.
Just added lyrics for a song about dementia, at Lyrics 2. Not the most cheerful subject by any means, but sometimes sad songs can have a beneficial effect. This is certainly true for songs about personal relationships, so why not about other difficult situations?