‘Funny if it weren’t so sad’ is used to describe situations which are very sad, for example because of utter incompetence in a serious situation, so sad in fact that one goes on to say it could be deemed funny.
I am specifically looking for a word which emphasises that the funny or comic part follows from the sad or tragic part. Full disclosure: this clarification was added after the first answer. This is also where the question differs from this question about something funny and sad at the same time.
One word to describe this is pathetic, however I feel that word isn’t quite strong enough. The definition by CB:
“causing feelings of sadness, sympathy, or sometimes lack of respect, especially because a person or an animal is suffering”
Example sentence (the bold is to be replaced by another word, the [would be] could be left out or replaced for a form of to be):
So at that point we lost the nuclear football, apparently it has been put on some commercial flight and it’s now travelling at 10 kilometres over the Atlantic, this situation [would be] funny if it weren’t so sad.
Definition of tragicomic
1 : of, relating to, or resembling tragicomedy
2 : manifesting both tragic and comic aspects