Sadly, for me, it's proved impossible to be friends with an ex immediately after breaking up with them.
I was with my first love for three and a half years. We split up very amicably and mutually just before I went back to university for my second year, so it was very easy to cut contact. About eighteen months later, we drifted back into a really nice friendship that we still have now.
But more recently, I was very much in love with a guy I was with for two years, and my heart absolutely broke when he split up with me. Like you, I was determined to stay friends with him whilst I got over him. I tried for about three months before I realised that cutting contact was the only way I would ever be able to move on. We were chatting as friends and meeting up occasionally and it would be so lovely to see him, but I'd cry all the way home in the car thinking about how much things had changed, and it made me miss him more and more. The final straw was when he got a new girlfriend and lied to me about it, and I had to hear the truth from somebody else. I realised then that we weren't really 'friends' at all and that I needed to put myself first.
I told him that I needed some space, and we stopped texting, chatting and meeting up about two months ago. Since then, I have seen him once or twice at parties (like you, we have some mutual friends and I don't want to lose contact with them), but we're just polite to one another and spend most of our time talking to different people. It's sad, but it's so much easier than how things were before. I was crying over him every single day before this; I won't say that I'm completely over him now and I still miss him and think about it from time to time, but I am living my life again and things are a hell of a lot better than they were.
I hope that eventually he and I will be able to be genuinely good friends like I am with the first ex. But I know that now is too soon. I tried to deny that cutting contact was necessary for such a long time and I only caused myself more pain. I know I made the right decision now, and when I'm ready he and I can rebuild our friendship again. But not until I know it won't hurt me.
It's really, really hard getting over someone. I do know how you feel. Good luck.