I just read your post and I am no expert in mental health or suicide - but have had friends
and family who have also dealt with both chronic pain and depression - including suicidal ideation. Its horrible and real for the person suffering from it and also horrible and real for those that love them and have to deal with it.
Do you have any children or other family members that you both are close to? Friends? I ask because its important to have all hands on deck and support - for her - for you.
25 years of marriage - with both good and bad matters and means something. Its the worse now in the for better or worse. She needs you and its a heavy demand but you can and will be there for her - and you need support too. Clearly the story you shared about your experience in college shows how it has triggered some difficult memories of when you have had someone in distress psychologically put pressure in you that you may or may not be equipped (nor should have to in an unhealthy situation) but this while difficult - is different. Its your spouse. You made vows that matter.
I dont know of any way to retrieve a deleted text - but you should not need to. It seems to me that right now you need to reach out to people and sources of support you have in family and friends. Maybe you can call a suicide help line and ask them for guidance.
There is one thing I know from my experiences with a very good friend and even a family member who attempted - and survived - a suicide attempt. They were genuinely in pain - one physically and the other mentally - was that in both cases they didnt think there was any hope and they wanted to end the suffering. They couldnt see that they mattered or were needed by others and there were many things worth living for. They both got help through having those of us who stepped up and made sure they got help - and reminded them they were loved and mattered.
Be strong. Love her and get support.