The Gemara (Shabbos 133b and Sotah 14a) derives from the Torah a mitzvah to emulate Hashem by being kind to others, to be a merciful person just as God is merciful etc. It doesn't differentiate between Jews and non-Jews.
An additional consideration is the complex issue of the prohibition of lo sechanem, doing certain kinds of favors or saying certain kinds of praises about (possibly) certain kinds of non-Jews. There is a disagreement among both the Rishonim and later Poskim if this applies to non-Jews in general, or only to idol worshippers. According to the latter view this prohibition would not be relevant in most cases. Even according to the former view exceptions can often be made for a variety of reasons, including darkei shalom and other principles which greatly limit the practical scope of the prohibition. A Rav is quoted here as arguing that the prohibition only applies in cases where it's being done for no reason (this idea is found in the achronim, see for example the Taz), but doing something to improve your character counts as a valid reason and takes it out of the realm of the prohibition altogether even according to the more stringent view. In his words,
Decent Jews are kind hearted and polite to everybody! אמרו עליו על רבן יוחנן בן זכאי שלא הקדימו אדם שלום מעולם – It was said about Rabbi Yochanan ben Zakai that nobody ever said shalom to him in the street before he said shalom to them. He was the first one to greet a man. ואפילו נכרי בשוק – even gentiles in the street; when he encountered a gentile, he was the first one to greet him. That’s politeness. That’s how a Jew behaves.
...The truth is that Jews are always kind hearted to everybody; only that the mitzvah of loving a Jew is a specific mitzvah that’s only for fellow Jews. You don’t have that mitzvah for anybody else.
But to be kind and polite, that’s not even a question. It’s not an
issur of lo sechanem. Lo sechanem means to do favors for nothing; that
you don’t do. However, for your own benefit, favors for your own
character you can do. And anything you do for gentiles that improves
your character, it’s a good thing to do because you’re doing it for
yourself.
Wherever this consideration does not apply, the default would be as the Gemara instructs, to emulate God by being kind to everyone.
@DonielF
's answer to "Befriending a non-Jew". Rambam's Mishneh Torah, Hilkhot Avodah Zarah chapter 10, says: "מפרנסין עניי גויים עם עניי ישראל, מפני דרכי שלום; ואין ממחין ביד עניי גויים בלקט שכחה ופיאה, מפני דרכי שלום. ושואלין בשלומן, ואפילו ביום אידם, מפני דרכי שלום".