Hi.
While you and your friend may have shared outlooks about being depressed, there may be some serious differences between your experiences.
Sometimes depression is a situation-based emotion, meaning that it is triggered by certain events; and sometimes it is a chemical imbalance, where your body lacks certain elements to maintain positive moods. This may be the difference between your friend's depression and your own. While you may have found it helpful to share conversations, emails and inspirational sayings, it may not be as easy for your friend. Instead, she might need to find other ways to help herself, if she wants to.
When she seeks you out, it may simply be useful for her to tell you her problems or talk about the mental institution. Is she asking you for help specifically for ideas about how to change things? Or is she just talking out her issues and concerns without looking for guidance on how to change? If she is in a hospital, it is likely that she is getting some kind of counseling and/or medication to try to help herself. Perhaps she is just trying to talk to you as a friend and not as a suicide prevention counselor. Of course, it is up to you to decide how you feel about taking on the responsibility of either kind of role.
You do need to be concerned about your own needs. Some things are too big for friends to handle. It may be helpful for you to let your friend know that while you care about her, you need to give her some space to deal with her own depression. You aren't abandoning her by doing this, especially if you assure her that she is often in your thoughts. Ask yourself: What do I need to do to ensure that I am happy and not resentful about my friend's depression?
You also might need to think about what your role will be if your friend continues to be depressed. If she remains the way she is while you continue to grow and change, your relationship might never be quite the same as it was. If your friend doesn't want to be helped or doesn't have the capacity to change, there's little, if anything, you can do about that. On the other hand, this may be something that she can get through or learn to live with, and your relationship may be enriched by the experience of going through it with her.