I'm sorry to hear about your breakup.
In my experience, it is
very hard to remain friends with an ex. I tried it once, and only succeeded in making myself miserable, so I finally had to tell him to just get out of my life. In retrospect, I think if we had let some time go by and then tried to establish a relationship as friends, it might have worked... that's something to think about.
Take care.