How do I gently tell someone their writing is bad (as in, needs significant work)?

A really good friend showed me a personal essay and asked for my honest opinion. She was looking to enter a contest, so I wanted to give her some good feedback to make her writing stand out.

But as it turned out, this was her final draft, and she was really just looking for affirmation that she's a good writer.

The essay needed a lot of work. But when I gave my friend a list of the things that needed to be fixed, she got so upset that she deleted the draft and didn't enter the contest at all. Now I feel terrible.

What should I have done differently? How do you gently break the news to someone that theor writing needs a lot of work?

I do think I was too harsh. But I also didn't want her to enter the contest without having a stellar piece.