I think that's nonsense, doctors have a job to do & it doesn't matter whether it's treating physical or mental illnesses, their responsibility is to keep you feeling well. And sleep is probably the most important thing your body needs, so if they won't help you with your anxiety, they will definitely try & help you restore your sleep cycle. They might just prescribe you with strong sleep meds, or they could take you in for a day or 2, so you can be calm & get some sleep while they monitor you.
What I've found from my experience, is that going to the emergency makes me anxious & scared, but once I get in, I feel immediately relieved & safe. 2 years ago I had a surgery for the first time of my life, which made me stay at a hospital for 2 weeks. And during those 2 weeks, I had absolutely no anxiety, I could easily talk to people & I wouldn't get nervous about anything, I even stopped smoking because I had no craving to do so. It was an experience that taught me what empathy really is, everyone was really kind to me & the doctors, despite having so much work & being so busy, were extremely nice to me, even though they didn't have to be, it was a huge breakthrough for me & I still haven't figured out how during that time, all the anxiety was taken away from me, despite having physical pain & limited mobility, I felt more free than I ever have in my life.