Generally, people focus on the “love your neighbour” segment of the rule. If this were all that the verse said, it would be easier to understand and to obey.
But “as yourself” makes it more difficult. It seems egotistical. It seems to put oneself first.
Nachmanides, the Ramban, acknowledges this when he points out that the text does not say v’ahavta et re’acha, but l’re’acha – not et which implies that I and my neighbour are on a par but l, which denotes “for” – i.e. my duty is not necessarily to love my neighbour as myself but to love for him that which I love for myself.
As I wish to be done to me, so must I do to others. As I wish others to feel my pain, so I must feel theirs. As I wish others to respect my dignity, so must I respect theirs. It is all very clear and very pragmatic.
Other commentators, however, read the verse differently.
The author of the Or HaChayyim HaKadosh emphasises the word kamocha, which he says indicates that my neighbour is not only like me but part of me, and only through loving him or her do I become complete.
If I fail to love my neighbour my own identity is defective. If I love you, I am truly me; if I do not love you, I am not even me.
Since each of us is made in the Divine image, if I fail to love another being who, like me, is in God’s image, then God Himself is in some way also diminished.