Friends with your ex

I just recently broke up with a guy I've been dating for 6 months, we have mutual friends, should I shut him out of my life completely? Or just hang with him if we are all hanging out together? I don't think we should hang alone because I don't want to be tempted.