Ahhh, young love.
I'll be frank with you, and as someone who has made similar mistakes in the past and learnt from them, I feel
semi-qualified to give you my 2 cents.
From her point of view, can you see how your behaviour is slightly out of order? You didn't tell her the feelings you have for her until you realised she was seeing this bloke, and you've gone down the route of punishing her for not being aware of your feelings. Although I'm sure you do care about her and don't want her to get hurt again, this isn't about that.
I've had that same punch in the gut when a crush of mine has told me that she's dating someone
else, and I did exactly the same thing. Completely shut them out, as the pain of them being with anyone else
but me was too much to handle. I was wrong for doing this, and there are quite a few situations that I wish I had had a face to face conversation and been honest about my feelings.
If I was you, stop hiding behind text messages, email, whatsapp and arrange to meet her somewhere quiet like a park, and be open with her. But before you do that you need to be open with yourself. This isn't about you caring about her, this is because you are romantically invested in her. There's quite a difference between the two.
Tell her that you like her, it hurt you that she was seeing someone else, and that you'd like to take her out on a date. Do not profess your upmost dying love for her, do not get gushy and refrain from trying to get her to stop seeing this guy. Neediness is an incredibly unattractive quality to have, and most people will run the other direction. The best thing you can do is keep your cool, be honest and ask her out. Then the ball will be in her court, anything that happens afterwards is completely out of your control.
Most importantly, and it will take you some time to realise this, there truly are plenty of fish in the sea. If this doesn't work out, understand that there are 4 billion women on this earth, and while she may seem like the only one for you, that may simply be your emotions getting in the way of your rationale.
I hope this helps you, good luck.