First of all, if you really feel like you're going to harm yourself, call 911 or whatever the emergency number is in your area. Don't think, just dial it, and say that you're "acutely suicidal" or something to that effect.
I know exactly how you feel. My girlfriend is the biggest reason that I stay alive, and, every time we have an argument or I perceive that she has failed me in some way or does not love me, I feel horrible, often suicidal. She's my only real human connection.
Just think of the other people in your life who love you. It may be very difficult -- it was for me -- but I am certain that you will be able to think of someone who truly loves you unconditionally. A family member, a good friend, or really anyone who would be hurt by you hurting yourself.
Do remember that she is only another person, with human flaws. She may not see the scope of your distress. Try to tell her your problems and concerns; it will strengthen the relationship. If it destroys it, then it was not a good relationship in the first place.
Also remember that you are a human, and nothing can break the human spirit, not loneliness, not fear, not agony. You will always be a person, a unique individual.
Humans fail. You are not a failure just because you think that you make mistakes. The only way to become a failure is to think that you are one. You may not even be making mistakes -- she may be, and you're perceiving them as your own faults because you love her.