I was happy to be left through a SMS by the craziest of my ex-gf, because the relationship had deteriorated and she had a very bossy and angry character, but I would never leave through a text message a girl that always was good and nice to me, that would be really horrible. Deal with how bad you'll feel, but watch her in her face, be honest and brave, she'll suffer anyway, but maybe a little less and at least you won't offend her. Maybe, if she too already understood your story is over, it will be much easier than you expected, and you'll remain good friends.