The word "neighbor" does not refer to people living on the same block or in the same voting district. (Not that any of the disciples actually had voting rights.) A neighbor is not determined by geographic, cultural, or even personal boundaries. A neighbor is defined by something internal. You may think this is an obvious concept, but at the time it was really quite radical, and even today most of us seem to either be ignorant of the fact, or choose to forget it. Our tendency is to be deeply attached to the individuals in our immediate circle and not give much thought to anyone else.
According to Swedenborg, the neighbor is that inner core of goodness or the "true self." When we love "the neighbor," we seek to serve this interior Divine spark within each person, rather than everybody's individual or collective egos. For example, you would not be "loving your neighbor" if you were helping him be dishonest, harmful, or unkind. That is not honoring his higher self. Nor is it acting in a way that is congruent with your own inner core of light and spirit. Your obligation is to encourage and support this 'best' part in others by acting from that same part inside yourself. You then love the neighbor as yourself.