One of the most oft-quoted Biblical verses is "love thy neighbor" (Leviticus 19:18). When people say "love your neighbor," we have to remember that it's typically abridged, and the entire verse is "love your neighbor like yourself," or ואהבת לרעך כמוך. It brings up a good question: why didn't G-d just say "love your neighbor"? Why did He have to add the word כמוך (like yourself)? What is G-d trying to convey here?
I have two possible answers, the first being that implicit in this famous Biblical verse is that we are commanded to love ourselves. People who love themselves are happier, which means they are able to better succeed in and enjoy life. If you're in bad shape, how much more difficult is it to have interpersonal relationships? As R. Joseph Telushkin brings up in his book A Code of Jewish Ethics, Vol. 2: Love Your Neighbor as Yourself (p. 10), "Think about your own behavior. Are you more likely to be patient, forgiving, and generous to others when you are feeling good about yourself or when you are feeling low or self-critical?"
The second possibility, which is not mutually exclusive with the first, is that the word כמוך is acting as a clarifier. Many individuals have a high opinion of themselves. Many individuals will still love themselves when they screw up. Many individuals also make sure are concerned about their own welfare. This is not to say that this sort of behavior is wrong. As Pirkei Avot 1:14 brings up, "If I'm not there for myself, who will be there for me?" But the verse doesn't end there. It goes on to say, "If I'm only for myself, what am I?" The Sefer HaChiniuch elaborates on Leviticus 19:18, and says that we are supposed to take the needs of others quite seriously, as if they were our own needs. Rabbi Israel Salanter was one to say that the physical and material welfare of another was indeed tending to one's spiritual needs.
We were not meant to be so altruistic that we neglect our own needs while we help others. Conversely, we do not live in isolation. "Love thy neighbor" means that the universe doesn't revolve around you, and that we are here to treat others in a fashion that would be comparable to how we would want to be treated if we were in the same situation. It means that when we screw up, we forgive others by giving them the benefit of a doubt (Pirke Avot 1:6), the same doubt that we would give ourselves. Even when someone is being cross or you're having a day, it still means treating them with dignity and respect because they are your neighbor, regardless of whether they are Jewish or not. It's about not judging someone until you have been in their place (Pirke Avot 2:5), whether literally or figuratively. "Loving your neighbor" is about putting yourself in the other person's shoes and loving them as you would yourself. The next time you have an interaction with another (or even if you're dealing with yourself), ask yourself what would be the most loving course of action. Take it as an opportunity to realize that you have multiple opportunities a day to actualize what Rabbi Akiva called the single most important principle to fulfilling the Torah.