When you say you're thinking of taking your own life, how serious are you about that? How urgently are you thinking that? At your age, everything is magnified -- and it will stay that way for a long time to come until at some point you hopefully mellow out. Grieving isn't depression, we all feel really sad when we break up, and it's worse when you're too young to really process what's going on. Only time takes care of this kind of pain, there's really no treatment for it, people get sad when bad things happen. When you throw in sex, well, it never gets easy. So that's one part of it. But if you're urgently thinking of suicide, you need to seek emergency help right away. You don't know now that in a year you'll have gotten over this and have met someone else -- things move fast at your age. The important thing is to stay alive until the urgency passes. If you're not urgently thinking this but you're just very very sad to this extent seeing a therapist can be very helpful. Talking to your parents and friends can be very helpful. But most importantly, if you're truly suicidal, don't wait, get help immediately. There are help lines you can call. And if you're not really suicidal, here's the thing about sadness -- if you hang onto it for too long it becomes depression. Depression can be treated in therapy. Please talk to the adults in your life.
I agree with the @Paxiled answer. You are too short for this pain, and I know that how much things are messed when something happens like this in your life. You just need some time to deal with this situation and be strong.