Personally, I never liked taking ANYONE to work parties. They aren't really fun if you don't know anyone.
I don't think it is appropriate to un-invite your friend. Tell your boyfriend you are very sorry you hurt his feelings, and you will make it up to him. Then, be careful not to make this kind of mistake again (if indeed you think it was a mistake, which I am not so sure of since you weren't obligated to invite him in the first place).
BTW - how old are you both?
Relax... I'll need some information first. Just the basic facts - can you show me where it hurts?