I don't think there are only two choices when dealing with other people, either. That would be a difficult way to live.
My real point, as a sufferer of serious health anxiety myself, is that a person whose illness is "all in their head" still deserves to be treated with kindness rather than dismissal. Their suffering is completely real to them.
(...and you can't prove that it's all in their head, anyway. Many mysterious and difficult to diagnose illnesses exist. I should know

)