Some things need to be let go..even people. It can hurt, but need to understand, that some things or even people have to be let go if you want to change for the better or grow. Doesn't matter how much you care for someone, if there are problems or some sort of negative emotion like resentment, bitterness, etc, that won't go away or just keeps being a burden on and off, it's best to let go of the person...even if it's happening on both sides, just for the sake of the other and yourself, it makes the most sense to move on from eachother. Doesn't mean either of you are bad people or friends, just not right for each other. Maybe just grew apart, maybe just different lifestyle, different ideas on life, that can't be blended in together. Or maybe just couldn't and appreciate eachother the way that should have been happening. Not all friendships are meant to last, doesn't mean that all of them that didn't last, were bad, just that their was something lacking in them or purpose came to pass possibly.
Just know that it happens...maybe you did screw up on the friendship yourself or even a relationship or maybe just weren't right for eachother, despite caring a lot and having good intentions, but just made mistakes, ...but come on, there are so many people in this world, so many that there are possibly waiting to connect with you or you even have other people already there for you, that you can just spent more energy on. Sure you may be in pain….you can cry, scream, take all the time you need to yourself...but don't shut others out, you still deserve appreciation and being your true self to others that care for you. One thing ends, but you still have things and people to live for. There is are always a light in the darkness, and even yourself can be a light to someone's bleak days. So don't give up hope on letting go or things ending, sometimes you need more darkness in order to see yourself shine brighter than you ever did before.
Plus you can always just keep people in your memories, and cherish the good times they did give you, even if they aren't friends with you anymore and etc,. That's the importance of memories...you may have a lot of bad, but the good ones are the ones that help you keep going while the bad ones teach you and can show you how far you come.