Anyone sometimes thinking about assisted suicide in pain flares? Because the pain is so severe

I said it to my family because I am in so much pain and also said that I sometimes would rather die than be in so much pain. They took it very seriously and wanted me admitted because i was depressed. I said that they didn’t understand what I meant. And the psych ward wouldn’t be able to help me unless they had some good neurologists etc. to help my pain. I’m“depressed” because of the excruciating pain, and can sometimes hardly be in my body because it hurts so bad. Hence why I said the things I said. Please tell me somebody understands what I meant! It’s not because I want to die, but the pain is so overwhelming. I’m certain I wouldn’t be having these thoughts if I had no pain. Anyone relating?