Basically, next time they do it, tell it like it is, angrily. Don't get emotional or begging, tell them how it is and tell they should stop acting like they're in year 7 and grow up, because they're the childish ones, not you. Get up and walk away confidently and maturely. Find someone else to talk to, and wait to see if they come back to you with their tail between their legs, which they generally would do. If they don't, they're not worth it. You won't lose your other friend if you do this, if he realises what he's been doing, but if he doesn't come back to you he's not truly your friend.