Should I stay friends with him after my breakup with her?

My girlfriend broke up with me at 2 am per text, I see her every single day talking to my friend. They’ve been friends even when we were together, but haven’t known each other before our relationship. Now my friend talks to me in other way, he’s colder, angrier, is distancing himself from me, but between every single class he’s talking with her, they’re laughing, like we were before we broke up. What do I do now? Should I be friends with him?
We’re both in high school, so we see each other every day, and we will for a year.
Should I stay friends with him after my breakup with her?
Post Opinion