Most, if not all of us have gone through a breakup of some sort (usually bad, let's face it) at one point or another in our lifetimes. You may not want to admit it, but you have, and it's okay! As I mentioned, we all go through them eventually, and it's important to know how to deal with a breakup when you come across them. You could be in a thousand different relationships (okay, maybe not that many) and still not know how to handle yourself when you part ways with someone you care about and can't imagine yourself not being with.
Whether it was under their terms or yours, it virtually doesn't matter. You should conduct yourself the same way, regardless. The same can be said for how long you guys were together for; it doesn't matter. It hurts me to see people I've known for years go "off the deep end" once a relationship they were in comes to an end, and hey, I'm not excusing myself from this, either. Now, I don't at all consider myself a "relationship expert," but I'd like to think I've learned a thing or two from my many mishaps over the years when it comes to romance and relationships. Thus, take my advice with a grain of salt, but I hope it can aid you in helping you get over a recent relationship!