I have remained good friends with several of my ex boyfriends, but only after considerable time has passed (1-3 years, depending on the seriousness of our relationship). During this period of time we had no contact. Maybe an occasional run-in, but it was "Hi" and "Bye". I passed the time by going out with my other friends, working, and pouring myself into my hobbies. The most therapeutic way to get past this is to busy yourself with YOURSELF. You need to be your own best friend right now 'cause this douche bag is doing a piss poor job of it. That's great that you consider him to be your closest friend, but he clearly doesn't treat you as such.
Once you get past this, you will have a new, more profound sense of self-respect for yourself.