I've only had something like that happen once, and I suggested that I had some good resources from my wife and kid, and I could hook him up. He kind of awkwardly laughed it off and said he was good.
I still don't know if he was trying to be use it as a punchline, or trying to share his condition. I certainly don't want to push people away from sharing their struggles if they are using humor to deal with a hard topic. But yeah, using it as a punch line is pretty insensitive. I've said I was being OCD as a joke about being particular about a project, and I totally could have hurt someone's feelings who actually struggles with a real condition, and that kind of sucks.