I think it`s safe to say, without a government mandate, doctors generally would never discuss the subject of gun ownership with their patients. In the scenario you provide, guns have nothing to do with a suicidal patient. No more so than cars, razor blades, prescription drug, etc. If you`re fine with being scolded by your physician for exercising your Second Amendment rights, then you have no dog in this fight. Never mind the data they are collecting for government. I`ll have none of it personally.
I would expect a physician to discuss pertinent subject matter with a potential suicide. If the conversation led to guns, it should not be taboo.
Government shouldn't be mandating the question, but that isn't necessarily the only reason he might be asking. His malpractice insurer might require him to ask. If I don't like that, then I am free to decline the information or his services. It's called freedom of association.
I have as much dog in this fight as anyone, and you have no right to make that determination for me. If I were "scolded" by a physician for owning guns, I certainly would not return to him.