Stop puking rainbows.
Er, talk to him. And, give him a fair shot. Let him know that his best friend is seeing you (His best friend
is seeing you right?), and that you guys need time to yourselves. But, if they are actually friends, make sure your guy pays at least some attention. And, if you guys are going to make comitments to hang with this guy, make sure you follow through. It seems that he may be feeling unwanted and or betrayed by his best friend (And for the worst reasons: A girl). Give him the time of day if you really care. If you don't, let him know, and don't let your guy friend lead his friend on.
But, honesty is always the best medicine. So, keep it straight.
Good luck.

Oh, and it might help if you wouldn't call him stupid. Ever think that that may be one of the reasons his is lashing out in the first place? How much more betrayed can you feel? You best friend keeps ditching you for a girl, and to add insult to injury: The girl won't stop making fun of you and calling you stupid.
If you want this solved, you'll know what to do. Otherwise, the kid might just be a jackass. In which case, lose him?