Ego is a negative feeling. It is a feeling evolved when you deliberately compare yourself with others. You compare yourself with people smaller or weaker than you in terms of money, power, authority, appearance, anything. The reason why you compare is to feel superior, bigger and powerful than others.
On the other hand, Self-respect is a positive feeling. It is a feeling of taking pride in what you are and who you are. It is a sense of higher being derived when you positively accept yourself regardless of money, power, position, appearance. It is only connected to oneself. The virtue of self-respect is regardless of people and things.