That's a million euro question. The issue of Italian identity has been controversial and debated for a very long time. Italians themselves seem to be unsure: there are examples of Independence and Unification champions travelling to other regions and describing them as "different as Japan" and that was the Age of Nationalism.
There are generally two different attitudes that are common. One is to identify as Italians against non-Italians. This happens generally abroad and there are examples of this as far back as Boccaccio's novels where even Sicilians are included in the lot. Although the first use if the words Italy and Italians (Italici) dates back to the Bellum Socialis in Roman times.
The other is raising differences when confronting Italians from other regions. This is also reported as far back as early Middle Ages, with a "Lombard" or “Frankish" north and a "Greek" (Byzantine) south and a "Roman" central area that reached as far as Ravenna. The kingdom of Italy, successor if the Lombard kingdom, had its southern border in Tuscany and Marche, and that lasted in Cavour's project in 1850s. The inclusion of southern Italy and Rome in the kingdom was a diversion of Garibaldi and not in the plan of the Piedmontese elites.
I'll quote myself from the thread When did people of the former Roman Empire cease to consider themselves "Roman?"
You're asking in particular about Italy, but I think this is still relevant.
Self identity is not a simple concept. One could argue that people never stopped considering themselves Roman. You could easily find someone alive today who identifies as a Roman.
One problem we have is definitions. What is a Roman? Simply a resident of the city of Rome? Or do you have other qualifiers, such as the Latin language or maybe ancient Roman citizenship? If we are considering self-identification you can see that the definition will be very broad.
Remember that these identities are fluid and always have been. You can find someone in Cincinnati today who might identify themselves as a Buckeye, an Irish-American, an African-American and an American – all at the same time, or perhaps different identities in different contexts. Here in Finland you can find someone who calls herself a Finn, a Swedish-speaking Finn, an Ålander, a European - again, all in one person.
The same was true throughout Roman history. There were people who considered themselves Romans as well as Goths, for example, or Romans as well as Greeks. There were also local identities which people identified with, such as cities or regions or even local warlords. This became more relevant during the fall of the West and as power devolved from imperial to local sources.
There have been finds of ‘barbarian’ chieftains in North Africa using Roman identifiers, like Roman titles, the Latin language, and various ‘Roman’ attributes such as civic duty, urban life and a stoic demeanour. However, these ‘barbarians’ had no political ties to any authorities in the Roman Empire. Meanwhile you have people undoubtedly Roman, like soldiers in the Army in Late Antiquity, rejecting some of these ‘Roman’ attributes and claiming ‘barbarian’ ones like animal savagery and hot-headedness.
Throughout all of this the concept of ‘Romanness’ never disappeared. It evolved and changed and was a fluid concept. It was useful in some contexts and worthless in others.
One interesting source for this in relation to the end of the West is Guy Halsall’s Barbarian Migrations and the Roman West 376-568.
As has been mentioned, this is a tricky question, and when people started to think of themselves as "Italian" would have varied a great deal by region. I can tell you that in the South, the Greek-speaking population considered itself to be Roman through the 12th century, anyway. That being said, those same Greek-speakers were actually still a part of the Roman Empire until the mid-11th century, so it's not as though they had been separated politically from the Empire for a terribly long time. Byzantine honorifics also remained in use in some of the former Lombard territories (such as Naples, Amalfi, etc) under Norman control as well. Whether or not they considered themselves to be Romans I can't say, but they definitely still saw themselves as being closely connected to the Roman Empire.
Sources: If you can read French, Italian, and/or German, see the work of Vera von Falkenhausen (such as La dominazione bizantina nell'Italia meridionale) and Jean Marie Martin (such as La Pouille du VIe au XIIe siecle). You may also check out G.A. Loud, and perhaps Gill Page's Being Byzantine for more on Byzantine conceptions of their identity.
Identities can add to each other. Even today one can be Italian but also European but also Sicilian. One need not to make a choice between them.
Follow up question is there a specific field of study for studying cultural and national identities?
Related question: when did the language spoken on the Italian peninsula change from Latin into the vernacular Italian? I'm fairly certain that Dante created, or at least wrote the earliest instance of written Italian in his Commedia, but when did people start speaking Italian?