Breakups

Is remaining friends after a breakup a bad idea?
My boyfriend (now ex) of a year and a half decided we couldn't be together right now because he is going through a lot of mental and emotional issues. He said he wants to remain best friends because after all we were really close before we even started dating. He says he wants me to be able to see other people but also has said that he can see us getting back together in the future.
The break up has given me a lot of anxiety and saddness and I would like to be able to hang out with him in the future. I just am afraid of my feelings and if I am going to get the wrong idea when we are hanging out.