Right now, she feels like she isn't mentally ready for a relationship. And that's okay. As long as you respect that, it will be fine. Mental illnesses are not your fault, and it's not hers, either. Neither of you asked for this. Don't blame yourself for this. You didn't cause it ... but you can't magically heal it, either.
So be a good friend. Learn as much as you can about the illness. Don't believe everything people say about them. They're not "excuses". People can't "choose to be happy". Some illnesses, like certain personality disorders, can make relationships difficult, and sometimes people do things for attention, but that's not their fault, and it's not okay to act like mentally ill people aren't actually sick, no matter their actions. It's an ILLNESS. It requires medical help, therapy, and/or possibly medication, among many treatments, to get better, if it possibly can.
Listen more and talk less. This is a problem that she is struggling with badly enough that she felt she had to end a relationship because her mental fortitude isn't strong enough to withstand a relationship on top of a mental illness. She's struggling right now. Listen to what she has to say, don't try to give her any advice unless she asks, and as difficult as it is, her struggles are not yours, and it's not a good idea to project your problems onto hers.
And finally, be realistic about this. You can't magically fix her. A good attitude and a first aid kit aren't going to heal her. You need to be patient, understanding, and supportive. If she can't get out of bed for a week, you can't just bust into her apartment and drag her out of bed and yell at her. If she hasn't made much progress and it's been a year or more, you still need to be patient and understand that she didn't ask for this and she's trying to fight it, even if she's not making as much progress as either of you thought she would.
And yeah, you're going to mess up. You might say something you didn't mean, or get frustrated and snap at her. And when you do, you apologize sincerely. Make it up to her if you have to. Just remember that recovering from mental illness is a long, slow, painful process. If you want to be there for her through this, you need to make sure that you care enough about her to stand by her side through this no matter what happens.
By the way, "I'm sorry is not the same thing as "I didn't mean to" or "I'm sorry you're upset". Just because you don't mean to say or do something mean or insensitive doesn't mean you didn't hurt her in some way, and it's better to be sorry for doing something bad than being sorry that someone didn't react to something the way you thought they would.
And take care of your own mental health. This is going to be stressful. You need to find good outlets to relieve stress, make sure you know how to properly release anger and frustration, and have people you can talk to when times get tough. Your mental health is important, and it's not often easy to help someone with their mental health if you're struggling with your own.