Any comparison you make between yourself and someone else will always be false because no two people had the same experience growing up. Therefore, the mental programings (i.e., the minds) of different people will always react differently to the same situations based upon their past experiences. As such it makes no logical sense to feel bad about yourself based on a comparison between yourself and another person. This is just the mind trying to protect you albeit in a dysfunctional manner. This is protection on a macro or species level. Jealousy begets competition which weeds out the weak and increases the overall chance that the species will survive.
As such, the next time you notice yourself comparing yourself to another person, acknowledge this is what is happening then say your meaningful word internally and move on.