The idea of living life can be very scary honey, I know. But there are so many things that can be enjoyed in life without either succeeding or failing. Now that you know you have to get help, that's a really positive step, even if you feel like it's not going so well. I know that there's a certain comfort in being ill, but it's not worth it, believe me.
Have you seen a therapist to try and understand why you do this? If not, can your GP or dietician refer you to someone?
From my experience, no one knows how to be happy or what they want from life - I know I don't! Neither do a lot of my much older friends. Life is scary, but there is so much to enjoy, even if there's still a lot of work and at times a lot of crap ahead. The fear of living is very real, I know, but it needs to be overcome, because there is a lot of fantastic experiences out there. There are other coping mechanisms that are much safer and healthier for you to use in times of stress, have you explored any of these?
Take care of yourself honey, hope that was helpful in some small way ;)
PM me anytime.