The gemara relates that when Mordechai told Haman he was too frail from fasting to climb up on the horse Achashveirosh had sent to parade him on through the city, Haman had to bend down for Mordechai to use his back as a stepstool. Mordechai took advantage of the opportunity and gave Haman a good kick. Haman asked, “What happened to ‘Binpol oyvecha al tsimach?’” To which Mordechai responded that the rule only applies to fellow Jews, not to him.
Maharal gives a beautiful explanation of what that should be so. Simcha comes from shleimus, completeness. When an external enemy suffers, it is to our benefit -- we become more complete, so we are happy. (Hashem says is name and throne are incomplete in this world because of our enemy Amalek; there is a lack of simcha. When the ultimate geulah comes and Amalek is eradicated, "Az yemalei sechok pinu.") When one of Bnei Yisrael suffers, even someone we may not get along with, it’s not really to our benefit. We are all part of the same tzibur -- the pain and suffering of any member of the tzibur is our pain and suffering as well.