You're having a problem with something. Someone shares a humorous anecdote about a time they experienced the same problem, and you feel better because of it.
"Maybe this will cheer you up, in a ______ kind of way."
There's a single word for this, and it's on the tip of my tongue, but I'm drawing a complete blank. I can't even conjure up a synonym. It's a bit like "a problem shared is a problem halved", except it's more about experiencing a dark humour.
Someone help me out here?