The problem is that that is the academic definition of Nationalism, which generally sees it as a modernist philosophy which seeks to coorelate the nation and the state together, as well as establishing broader political engagement by expanding the definition of 'the nation' to include the middle and lower classes, usually by appeals to a shared identity which can include, but not limited to, language, ethnos, traditions or political ideology.
If that is the case, then the Romans already had a good claim of possessing such an ideology. There's a reason Kaldellis often refers to Romanía not as an empire, but the 'nation-state of the Romans', which at times in its history possesed an empire.
But each child received from its father the ancestral traditions of the Romans and the impulse of their genos. And just as the genos of the Jews grew in size in Egypt under the Pharaoh, so did it happen with them: the tribe (phylon) of the Christians increased through the Orthodox faith and holy baptism. Speaking among themselves about their ancestral homeland, they lit in each other’s hearts the secret hope that they might escape.
This example is from the seventh century. It talks about Romans from the Balkan provinces being taken captive by the Avars, resettled, then intermarrying with Bulgars, Avars and other foreigners. Sixty years later, they move against the Avar khan. In this text, the Romans are treated as a
genos of their own, separate from foreigners despite no longer being in Roman territory, because they have their own distinct identity, customs, memory of their homeland as well as religion. The children of their mixed marriages did come to identify as Romans too, because they were raised as Romans - showing that Romanness defined less by ancestry and more by culture and connection to the broader community of Romans. In this sense then, Roman ethnicity was bound by narrative more than it was by blood. We see this motif with many in the court who may or may not have been descended from Armenians, Slavs or other such minorities. They were also seen as Roman as long as they followed Roman customs, traditions, spoke the Roman language and followed the Roman religion. Romanía was exceptionally capable at Romanizing minorities, and absorbing them into the Roman whole.
Three centuries later we have Constantine Porphyrogennetos writing:
For each nation (ethnos) has different customs and divergent laws and institutions, it should consolidate those things that are proper to it, and should form and activate the associations that it needs for the fusion of its life from within its own nation. For just as each animal species mates with its own race (homogeneis), so it is right that each nation also should marry and cohabit not with those of a different tribe (allophylon) and tongue (alloglossoi) but of the same tribe (homogeneis) and speech (homophonoi).
This is exceptionally xenophobic in many ways, extreme and in part certainly rooted to Constantine's earlier troubles with his powerful caretakers, but it does show that the Romans had a conception of ethnicity, that ethnic groups did exist and were defined by certain elements. These were not a people who would not understand the concept of a nation. The Romans came to believe themselves a nation, an ethnic group bound by a common narrative, customs, practices, traits and a shared homeland, the domains of Rome, that was separate from other groups. They were not a denaturalized mass, bereft of identity.
In the frontier poem Digenis Akritas, the protagonist's father is a Muslim emir who falls in love with a Roman woman, abandons his people and becomes a Roman himself. He frequently speaks lovingly of Romanía, his new home, linking it with the love for his wife, and considers it his new homeland. This shows that the Romans also believed (certainly enough to put it in their stories) that the state in which they belonged had an identity and interests of its own (separate from the interests and its emperor, who was perceived not as
owner of the state but as its first servant), honor that could be satisfied, or offended, made proud by greatness, or ashamed by defeat. One could identify with it, serve it and toil in its name. These are characteristics very close to those of modern states in many ways. Also much like a modern nation-state, it had a name, Romanía, consistently used across the centuries by its people.
The former soldier and later writer Katakalon Kekaumenos in the eleventh century writes that death in battle is not to be feared, if it is on behalf of the
patris (fatherland) and emperor, a mentality that one could well think of as nationalist. Notably, the ancestors of Kekaumenos were of non-Roman descent, some even fighting against the Romans, but he also wrote that this did not affect his own loyalty, and even recommends
against putting foreigners in high positions in his writing!
Things like this are why I don't think nations and national identities are a modern phenomenon, though
nationalism likely is. From the Romans themselves, we also find them remarking that the Bulgarians were remarkably proud of their nation, something which made them more likely to be rebellious. Certain scholars see similar phenomena in Antiquity - Rome in its period as a city-state, or the
poleis of Greece certainly had some attitudes that can come off as very national when it came to their denizens and how they perceived their native land.