Hello mate.
First of all, I want to let you know that, regardless of how you might feel, you aren't alone

. There are lots of people out there, just like you, who want to talk to you, and be your friend, because you're awesome.
Onto the matter at hand. Have you tried to sit down and talk to her about this? I don't recommend breaking off a friendship, or any kind of relationship, through a text, but I can understand that it must be pretty agonising and scary for you, and you felt you had no alternative.
It seems like you want to be more than friends with her. Have you tried to talk to her about that? Have you asked her out or anything like that when she became single?
Talk to her about your feelings. Since she's your friend, try to talk to her and get her to understand your situation. Tell her about your feelings, and your anxiety.
At least she'll understand your situation a bit better and will understand why you might want to break off the friendship. Or who knows, she might even reciprocate your feelings. But you won't know until you try.
But I don't know enough about the situation, so sorry if all this way off.
Regardless of the situation though, since she's your friend, just try to talk to her about what you're going through.