What to do when my Ex who is also my boss at work broke up with me and now wants us to be friends still?

My immediate boss who is 35 years old, and single, is my first official boyfriend. I am 23 by the way who is still pursuing a higher degree while working. We've known each other for almost three years when I started working in such office. But it was only last year when he became my immediate supervisor. It was also only during such time when he made moves about being interested in me. Before we started texting and exchanging sweet messages (secretly of course), we were good friends (he's the kind of person that's friendly and all being an ex-politician). At first, he didn't assure me with anything yet about getting involved/serious with me. But I had fallen for him and, I, having had just got over a pseudo relationship (MU/Mutual Understanding kind of thing) did not want to settle for anything less than a committed relationship, so I ignored him and just wanted to stop whatever it is that we are having if he cannot give me the secured relationship that I want. I don't know, maybe he got scared of losing me. So after about six months of assumed-courtship, we were officially in a relationship (which was of course a secret thing considering our employer-employee relationship and the fact that he is too well known in our vicinity). I almost gave him all of my being. But things hadn't worked out the way I expected. He was too busy and didn't have time for me. I had been jealous and insecure and compelled him to text me every now and then. I complained to him almost all of the time. What was I to do? He was my first boyfriend and he did not have time for me. I got tired. But so did he. And I told him that. And that's when he said that he wanted us to be free so as to avoid anymore arguments and hurt feelings. He said that I should focus on my studies and that he has a lot of things to think about work and his family. That he has lost interest in the relationship because of my demands. But he said he still wants to be just like before - friends with no commitment whatsoever. I have a promotion coming up so I can't possibly leave the office now. I don't want to be friends with him but of course I'm obliged to be nice to him. I don't know what to do. How to react. I need help.