1) His girlfriend was not honest with him about how she felt about the situation.
2) He was not honest with you when he found out what she said.
Honesty in a relationship is always important, but especially in a long-distance relationship, honesty and trust are sometimes all you have, since you can't have the in-person time together.
The other stuff, admitting to himself you weren't bi, seeming to take her side and not support you like you feel he should have, saying he can't come visit because of job searching, could be related, but the core is: why would you want a relationship with someone you have good reason not to trust?
You wanted proof that you were valued. Unfortunately, you got it, just not the way you were hoping. You broke up with him, offered to try to work it out, and he declined. You don't need to to anything about him OR his girlfriend except learn from the situation and put your energy into maintaining a good relationship with your roommate, who probably feels quite caught in the middle.
Pan Female, Hinge in a V between my mono (straight) husband, Monochrome and my poly (pan) partner, ThatGuyInBlack