Not all friendships end badly. As people grow and change, so do the relationships in their lives. That's not really a bad thing! It's simply a part of life. Some friendships just wither over time, even when it's nobody's fault. Perhaps you don't have as much in common, you have new social circles, or you move. Either way, you end up singing the "We need to catch up soon!" song without ever actually doing it.
Regardless of how your friendship ends, it's important to take time to grieve its loss. Appreciate the good and understand what went wrong. Whether you've been friends for five years or five months, it's okay to be sad, angry, confused, or whatever other emotion comes your way.