Awe well I'm sorry you had to go through that
Things will get better, it just takes time. I'd just say for now don't try and think about him too much, I know you run into him but just see him as a stranger. Because letting him see you still have feelings kinda makes him the winner. Show him your strong, and show him what he is missing.
As for being friends with your ex, it's all personal preference. If you want to be friends with him you go ahead. But I found it very hard to be friends with some of my ex's.
It's awkward, feelings seem to creep on you even though you try to control them, and every other thing like remembering your relationship and when the ex is in a new relationship you can't help but wish bad things. (well at least I have)
I hope you feel better soon huni ♥