It is possible, but of course it's not a one-way street. They have to want to keep in touch with you too. I know this sounds obvious but sometimes when A leaves B, B can be very hurt by your refusing to take sides, or welcoming A's new partner while B is still single and grieving for a relationship.
Two couples we know broke up after long term relationships of about 10 years. In one case they had both known that something was wrong and the relationship was dragging on for a couple of years. They broke up fairly amicably, even though he had started falling for someone else and that was the catalyst in ending it. In the other, the guy M looked around, saw his friends getting married and engaged, and decided that settling down wasn't the life for him. His girlfriend H hadn't seen it coming. Of the four people I've mentioned, the person we see least is the H. She took it very personally that we didn't try to change her ex's mind to get back with her. But having met up with him it was clear that he had done the best thing for him, and I wasn't about to change his mind. (They're both with other people now who suit them much more and she's getting married soon.) But our friendship never really recovered, although I tried everything to keep her as a friend - texts, emails, invitations for drinks etc. Although she's well over it now, there was another reason too:
With a newly single lifestyle, couple friends can fall by the wayside for professional opportunities. Your friend may throw themselves into working harder, taking jobs working away, and socialising with work friends. Same with hobbies. H did, and has a whole new life. Which is great for her, but I do miss her!
You can do your level best, but it may not always work. It's horrible to lose a friend from a breakup, but sometimes you can't change that.