I agree with Robusto:
Don't compare yourself to the friends you were better than.
Don't compare yourself to the friends whom/that you were better than.
At least to me, it sounds good either of these ways. They have basically the same meaning as the original sentence and/or his.
Alternatively (and in my opinion this sounds more natural), you could just leave them apart:
Don't compare yourself to your friends; you're better than them.
The use of the past tense seems like a weird clarification, but if you were to keep with it, just use one of the first two.
Something else to consider is what Lawrence has said: the comment by Robusto is ambiguous in that the first sentence could (and probably does) refer only to the friends you were better than and not to friends you weren't better than. Here, I'd think Jason Bassford is better and less ambiguous with just adding a conjunction between the two sentences.
I've made an additional sentence to address this ambiguity, although it doesn't sound as natural anymore:
Don't compare yourself to your friends, whom you were better than.