That is why it is said that we should decide what we want from others, and then behave with them in the same way. If we want them to care for us, be considerate and helpful, we should begin by adding these things in our behavior.
Even if by chance others do not reciprocate, we will learn unconditional love and acceptance, which is one of the highest divine virtues. Our heart will be cleansed, and so there will never be a loss. But instead if we harbor grudges against others, people will do the same with us, and we will not understand why everyone is behaving badly with us.