The Bais Yosef (YD 367) brings from the Kol Bo that there is a mitzva to be Melavah an Akum four amos. The Bais Yosef explains that this refers to Chasidei Umos HaOlam because they have a Cheilek of Olam Haba.Rav Moshe Shternbuch (1:721) brings the Rambam who says that this is only if the Akum kept the 7 Mitzvos Bnei Noach. Moreover he needed to have kept them because that is what Hashem wanted and not merely as a humanitarian gesture. However says Rav Shternbuch, from the words of the Bais Yosef it seems that any Akum who is kind to Am Yisroel has this status, as long as he in fact keeps the 7 mitzvos, even if it isn’t Lishma.
From here we learn, says Rav Shternbuch, that any Akum that was good to Am Yisroel, not only could we pay him his last respects, but it is even a mitzva to do so. This will also show our Hakoras HaTov and make a Kiddush Hashem.