I recently went NC and blocked someone who was doing this to me. It's all a game to them, they don't want you fully but they don't want anyone else to have you. They like having you when they feel like it but then push you away when they're done. It's not fair but you have to realise that only YOU are in control of this situation.
Want to be friends with him? Well you can't go from dating and still being 'besotted' with him to being friends. It's like a cycle, you may have started out as strangers, become friends, got into a relationship and now you need to start that cycle over to actually be friends. Meaning you need DISTANCE, you need to not contact him. I understand you work with him but I would tell him that for now he needs to leave you alone if he's not interested in anything more.
Just remember the longer you waste on this guy, the longer you are missing out on other people out there. Have you been on other dates or even considered getting back out there? Even just using dating apps to chat to other people can really help make you realise he is just ONE guy out of thousands who could actually treat you a lot better.
Every time you go back to him, or chat with him, you are just boosting his ego. I think we actually want people more when they don't want us. It's a weird thing we do, where we feel rejected and we want to prove to ourselves that we are worth loving, and we want that guy to love us. But he's not worth your time, you really do need space to see that even if it's just avoiding him as much as possible at work and NC outside of work.