I have had chronic back pain for 11 years now due to my weight. I have been suicidal before (a few years ago, not since) from severe depression which I've had since I was 15 years old.
My advice, and feel free to just ignore this if it doesn't make sense to you, treat her pain first. If you live in a state that has legal medical marijuana (or Colorado would be better) get her some. She's not responding to the low dosage pain meds and the doctors won't give her a higher dose (with good reason, she's suicidal) then that's the best course I can see.
You need to treat the physical pain first because I guarantee you, it's clouding her judgement on everything else. Think about it, when you're in constant unrelenting pain, and you've seemingly have tried everything, wanting to die seems like a good idea to the pain racked mind.
As for institutionalizing, that should be your last option. They'll sedate her, they won't treat her physical pain at all and she'll be in a foggy haze basically until they decide she's not a danger to herself any more and then release her and you're back to square one.