I can only speak for my area of interest the 3kingdoms civil war but hopefully another can give a wider overview.
When the Han rule collapsed after centuries of rule (bar the brief usurpation of Wang Mang) into civil war 190, leading to many warlords then to three (well four if one counts the overlooked Gongsun clan of Liaodong) factions by 214 (and becoming Emperors in the earlier 220's).
It was seen as a civil war, the other factions (unless they were allies) were rebels who needed to be brought back into the fold rather then simply a rival state. There were regional hostilities within kingdoms and that played it's part in the politics but there was a never a sense that the land wouldn't be unified by one of the three (ideally your own) eventually, it just might take awhile. That this was all the natural borders under Heaven rather then barbarian lands and it would be reunited again.
For the largest of the three, Wei. They saw their rivals as rebels, when Shu Prime Minister Zhuge Liang attacked Wei for the second time in 229, the Emperor Cao Rui sent out a memorial to the people of Shu (or rather for his own people and officials to see) and after attacking Zhuge Liang and his ruler Liu Shan, he bemoaned the land under Heaven was not at peace and finished with that the people of Shu he considered his subjects. "We believe that of the lands none are not the ruler's subjects, beyond where the army occupies brambles are produced, and I do not wish to send a thousand household's loyal and honest and chaste and good, to with that depraved and muddled group together be destroyed. Therefore first give this disclosure, to show clearly the state's honesty, encourage thinking of change, to not stay in a disordered country. Bā-Shǔ's officers and officials and people all by [Zhūgě] Liàng coerced and compelled, from Excellencies and Ministers on down all obey with bound hands."
Later his officer Zhang Mao protested against Cao Rui's behavior and expenses, that if he was frugal and set a good example, Shu and Wu would surrender, bringing about the longed for days of Great Peace. Even when court officials argued for easing off camapigns like Hua Xin, it was Wu and Shu defy the mandate but the better route of bringing their submission would be good governance and building strength rather then force of arms. For Wei, being the largest power wasn't the job complete, nobody suggested that the lands of Shu and Wu were legitimate rival countries.
After the civil war when debates about who were the legitimate successors to Emperor Xian when he abdicated, Wei's failure to unite the land (the Sima clan seized control in 249 and would conquer the land) was seen as due to moral failings by the Cao clan. That Heaven prevented Cao Cao from conquering at the 208 battle of Chibi, that they had been unworthy of the true mandate of Heaven.
Shu: Shu called themselves Han (Shu-Han or Shu, is used to help differentiate from the two Han dynasties) claim to legitimacy was that their rulers were of the imperial line, distant relatives to Emperor Xian and thus continuing the long dynasty. That this was simply like the usurping Xin under Wang Mang, a brief disruption of the natural order and then the Han continues. Wei were usupers and rebels, Wu were... uh totally different they were allies, the Han would be restored. Like the founder of the Han Liu Biang, the Han would sweep out from Hanzhong and take over the Central Plains once more.
Their base of Yi was a frontier province whose connections to the rest of China could be distant (Michael Farmer's The Talent of Shu: Qiao Zhou and the Intellectual World of Early Medieval Sichuan is very good on this) with a different culture in many ways including in education but they were part of China whereas the region of Nanzhong on their border was not. There was no talk of independence, they were connected. For the rulers, they needed to take back the traditional Han capitals Chang'an and Luoyang. When Shu fell (as Shu offical and soothsayer Qiao Zhou foretold), this was simply a return to unification rather then take over by foreign powers.
For diplomatic reasons, allies Shu and Wu (coming up next) both pretended the land would be split between them when Wei fell but Shu envoy Deng Zhi bluntly told the told Wu ruler Sun Quan " Just as Heaven cannot have two suns, Earth cannot have two Kings. If after we have together conquered Wèi, you, great King, still do not recognize who truly holds Heaven’s Mandate, then each lord will establish their virtuous authority and each side’s subjects will exert their loyalty, and the officers will beat the drums and the war shall begin and that is all "
Wu: The southern kingdom of the Sun family. In 208 when the Sun was just a warlord faction under the Han and Cao Cao advanced south, there was open talk of surrender including from relatives and loyal senior advisers. Nobody considered it as a foreign power but either surrendering to the controller of the Han whose power seemed too strong or opposing a traitor to the Han that they could yet beat and unify the land under the Heavens.
From then on, Wu were heavily engaged in war with the Cao family and Wei with odd break here and there. Wu never proclaimed a breakaway from the rest of China though thanks to the novel Romance of the Three Kingdoms cutting out many of their camapigns and making them passive, a myth has grown that their wish was independence. However Sun Quan and co talked of unifying the land, justifying their legitimacy (Cao's were traitors and Han had lost the mandate) to rule it all when he took the throne in 229.
One commander Lu Su was once honored by Sun Quan dismounting to greet him and shocked everyone by proclaiming that wasn't an honour that satisfied him, the only thing that would do so " I hope when your honored virtuous authority gains the Four Seas, envelops the Nine Provinces, achieving the Emperor’s enterprise, you then use a light wheel carriage to summon me; only then will it be enough to honor me "
Sources: Various SGZ's (Cao Rui's annals, Hua Xin, Deng Zhi, Zhou Yu, Lu Su) by Chen Shou translated by Yang Zhengyuan
Rafe De Crespigny Imperial Warlord and Generals of the South
The short answer would be, "it depends."
The longer answer: Historically, the two periods prior to unification under the first Emperor of the Qin 秦始皇 (259 – 210 BC) are referred to as the Spring and Autumn 春秋 period, and the Warring States 戰國 period, both taking place under the nominal reign of the Eastern Zhou 東周 (770–256 BC). The Eastern Zhou was preceded by a smaller kingdom, the Western Zhou 西周 (1045–771 BC) which had in turn overthrown the Shang 商 (who claimed to have in turn overthrown the Xia 夏, inventors of the Chinese script), setting up a feudal vassal system 封建 which, over the course of several centuries became increasingly unwieldy, while at the same allowing the (written) language and culture of the central state to spread across a larger and larger geographic area. Here's a map of the various kingdoms that existed during the SA&WS periods, with Zhou the middle:
https://depts.washington.edu/chinaciv/1xarzhou.htm
With the exception of the oracle bones (Shang), and bronze inscriptions (Zhou), our earliest texts (Confucius and so on) date from the SA&WS periods. From these texts we can see that people did have a concept of 'foreigner' and 'native', typically described in terms of 'guests' 客人 and 'hosts' 主人. However, at the same time, a shared corpus of texts allowed people who came from outside of the historical Zhou heartland of the Wei River 渭河 valley (a tributary of Yellow River 黃河, in today's Shaanxi and Gansu provinces) to demonstrate cultural affinity with the Zhou when it benefited them to do so. For example, Stratagems of the Warring States 戰國策 records the following anecdote:
Once there was a man from Wen who migrated to Zhou, but Zhou would not let him in. ‘Are you a foreigner [literally, a guest],’ they asked him. ‘No, I am a native [literally, a host],’ he replied. Then he was asked what lane he lived in, but he appeared not to know. So an official took him off to prison. The ruler sent someone to question him: ‘Why did you call yourself a native when you are in fact a foreigner?’ The man replied: ‘When I was young and studied The Book of Odes, I chanted the following verses from it: “All land underneath Heaven is the king’s land. To the far shores of the Earth every person is the king’s servant.” Since Zhou today rules All under Heaven and I am a servant of the Son of Heaven, how then can I be considered a foreigner? That’s why I said that I was a native.’ The ruler of Zhou thereupon ordered his officer to set the man free. 溫人之周,周不納。「客即?」對曰:「主人也。」問其巷而不知也,使因囚之。君使人問之曰:「子非周人,而自謂非客何也?」對曰:「臣少而誦《詩》,《詩》曰:『普天之下,莫非王土;率土之濱,莫非王臣。』今周君天下,則我天子之臣,而又為客哉?故曰主人。」君乃使吏出之。
[Translated by Roel Sterckx in Chinese Thought, Chapter 1]
During the SA&WS period, the perceived cultural proximity of a given kingdom to the Zhou was used to justify the partial conquests of one kingdom over another (and later, the outright elimination of rival kingdoms). The government minister and poet Qu Yuan 屈原 (340–278 BC), from the powerful but corrupt southern Kingdom of Chu 楚, for example, famously drowned himself in the Miluo River 汨羅江 after learning that the capital of his state had been captured by the armies of the western Kingdom of Qin 秦, which was often accused of being overly influenced by the 'barbarian' cultures of the Rong 戎 tribes to the west and the Di 狄/翟 tribes to the north.
The historian Sima Qian 司馬遷 (145–86 BC) touches on this when discussing the surprising success of Qin in conquering the other kingdoms of the Eastern Zhou:
Qin originally was a small and remote state, all the Xia shunned it, treating it as Rong and Di [“barbarians”]; [only] after the age of Lord Xian [獻公, 384–362] it became a constant hero among the overlords. When we discuss virtue and righteousness of Qin, it does not match even the violence and cruelty of Lu 魯 and Wei 衛,10 when we measure its armies, they are not as strong as those of the three Jin 晉 states (i.e. Wei 魏, Han 韓 and Zhao 趙), but at the end [Qin] annexed All under Heaven. It is not necessarily due to the advantages of its mountain barriers and benefits of its geographic situation. Truly, [Qin] was aided by Heaven. 秦始小國僻遠,諸夏賓之,比於戎翟,至獻公之後常雄諸侯。論秦之德義,不如魯衛之 暴戾者,量秦之兵不如三晉之彊也,然卒并天下,非必險固便形埶利也,蓋若天所助 焉。
[Translated by Yuri Pines, Biases and Their Sources p13]
Following the establishment of the Qin Empire in 220 BC, you begin to see the concept of inevitable cycles of empire and civil war emerging. This is stated most succinctly in the first line of The Romance of the Three Kingdoms 三國演義:
"The way of all under heaven, it is said, is that all that is long divided must unify, and all that is long unified must divide." 話說天下大勢,分久必合,合久必分。
This novel, attributed to the late-Yuan, early-Ming playwright Luo Guanzhong 羅貫中 (~1315 - ~1400 AD), is a 120-chapter dramatic retelling of The Record of the Three Kingdoms 三國志, compiled by Chen Shou 陳壽 (233–297 AD). (In fact, it was almost certainly compiled from earlier oral retellings 平話 of the same history. See Andrew Plaks, The Four Masterworks, pp368–9)
Three Kingdoms is concerned with the collapse of the Han 漢 dynasty (202 BC - 220 AD) and the eventual founding of the Jin 晉 dynasty (266–420 AD) following the Yellow Turban Rebellion 黃巾之亂 of 184-205 AD, a peasant revolt linked to millenarian Daoist secret societies. Unlike the SA&WS periods, writers in the post-Qin period is increasingly framed their discussion of the state in terms of dynastic unification and separation under a single emperor. In contrast, under the feudal vassal system of the Zhou, writers stressed the relative worthiness of a given ruler of a given kingdom, basing that worthiness on how 'Zhou-like' the ruler was perceived to have been.
In terms of how people identified specific conflicts between or within states, (much like people today) it largely depended on what they personally stood to gain or lose from the conflict in question. As can be seen above, a person trying to migrate from one state to another might have emphasized his own 'Zhou-ness', whereas a person like Qu Yuan, who had served in the government of a failing state, would have understandably taken his loss of identity more to heart.
Sources:
I see that there are already a few answers/specific anecdotes about Chinese unification (I can only blame myself for not spotting this question faster haha) which have attempted to explain how China 'defined itself' during the 3 kingdom period or the Warring States period. Hence,I'll just go over the scholarly idea of tianxia with a few examples, followed by (poached) examples of the opposite variety;if 'fragmented' Chinese states saw themselves as successor states to one day achieve the mantle of reunification,did a unified China see itself as China ?
TLDR: Motives and purpose are about as varied as the men and women who make them up. History for China,or any nation for that matter, should be studied on a case by case basis rather than rough generalization,in my opinion. Words change their meaning and Unification is the thinnest of veneers,especially for a country as diverse and varied as China.Did the Southern Ming see themselves in civil war against the Qing ? I doubt it. Did the burgeoning Tang state see itself in a "civil war" against the ailing Sui or did it see itself as a legitimate successor state at war to rule China in the Sui's stead ? If the Liao Khitan empire owned Beijing but the Song ruled most of China proper,were the Liao-Song wars a civil war or "actual" war between two states.
Why did I use the word Tianxia ?
In a sentence,because it's what the scholars like to use to define the ancient Chinese state and its notion of nationalism.
The word Tianxia (literally All Under Heaven) is an old Chinese cultural concept that is not nearly as old as we think. The first mention of it is in roughly the 8th century BCE. It does not appear in Early Zhou(1046BC-roughly 800BC) sources,is not mentioned in bronze inscriptions and absent from the earliest chapters of the Shu jin (書經) and the Shi jing (詩經), a book of poems and hymns. Now the most famous example is the oft-cited passage from the 8th century BCE poem 北山 (Beishan) which states:
“Everywhere under Heaven is the King’s land, each of those who live on the land is the King’s servant and hence what are the limits of everywhere under Heaven”? (溥天之下,莫非王土,率土之濱,莫非王臣)."
This poem's verse comes with a lot of context as it was a time in which the royal house of the Zhou (known collectively as the Kings of Zhou) were in a period of decline with limited ability to enforce actual authority beyond their royal fiefs,culminating in the sack of the royal capital Haojing (Luoyang)). The poem itself laments the fate of the fall of royal authority and,tellingly enough,the word tianxia dosen't appear for later on for most of the Zhou dynasty,signifying that tianxia in its original meaning held a very different idea than "China proper" as we know it.
To quote Yuri Pines on this "It is therefore likely that originally tianxia referred to the area under the direct rule of the Son of Heaven, and its limits might have shrunk together with the contraction of royal power."
As frequency of the word vanished,so too did China slid further and further into what we term the the Chunqiu Period or the Spring and Autumn Period (~771BC to 476BC) which saw conflict spread across China as the former Zhou states vied for supremacy and the word tianxia suddenly spring back into parlance. The Zuozhuan (左傳),a 30 chapter book covering the period, mentions this term only four times in the first half but eighteen times when recording the speeches of sixth century BCE statesmen.This increase is accompanied by gradual differences in how the word was used; It was gradually referring to the political state of affairs rather than simply the royal fief. In another book,Lunyu (論語),this term is mentioned 23 times and its cultural meaning twisted. Instead of simply meaning the royal fief,it was used thus:
"All under Heaven will return to benevolence” and “Three years mourning is the common mourning in All under Heaven” followed by the long "When the Way prevails under Heaven, rites, music and punitive expeditions are issued by the Son of Heaven; when there is no Way under Heaven"
If we substitute "All under Heaven" for royal fief,it makes no sense in context. However if we substitute it for "The Land" or perhaps "China",we start to get an idea of how the term was starting to be used. Instead of being a word,it was now a political word,a unit that meant "the realm". This is the fundamental idea what the late Joseph R. Levenson and Yuri Pines were trying to convey : The evolution of how tianxia became a term. Tianxia had evolved,whether by means of thinkers all agreeing to a consensus (unlikely) or in the national zeitgeist,in that the word was now coming to mean China because the people who used that word all saw themselves as king and used it to as a means to express superiority over all their rivals. Hence the royal domain was now "all my land and my rivals' land" because each king now viewed all that territory as the royal domain. (Bear with me,this'll make sense soon.)
Work in Legalism and the Qin conquests are about as far from what I usually read on as is humanly possible so I won't go into extreme detail but I'll leave a few links below. The end result was that in 221BC,the first Emperor of China united tianxia after some 5 centuries of internecine warfare. The nature of how the Qin viewed China and vice versa is perhaps best exemplified by a memorandum by Han Fei (a philosopher) to the then King of Qin in 233BC
"I heard that All under Heaven has Yan at north, Wei at south; [they] will connect with Jing (Chu) and rely on Qi, absorb Han and establish a vertical alliance, and then face to the west and make trouble for powerful Qin. I look at this and laugh. In the world there are three factors of defeat, and All under Heaven possess all three… Now, as for Qin lands, if you cut the longer and extend the shorter lines, they will be several thousand li squared..... in all these All under Heaven cannot be compared to Qin. If using all these you raise [troops] against All under Heaven, All under Heaven can be annexed and possessed."
Wait what ? Why is Qin not "All under Heaven"? Wasn't the warring states a supposed jockeying for power between supposed equals in some bid to achieve hegemony ? China in civil war against itself ? Why was it the outsider,the invader the not -tianxia?
Again,I quote this to illustrate one point : Tianxia varied depending on who was using it. Each king justified tianxia as both their casus belli and their raison d'être ;They conquered each other because they needed to unite all of tianxia and it was tianxia because their rivals owned it. A self perpetuating circle,if you will. Over time and over dynasties, this became the "norm". Chinese lands had to "unite" because previous dynasties had taken said land(Han conquest of Nanyue),or because there was a rival warlord who challenged imperial power(Song unification in the Tang-Song transition),or because a rival king,like the kingdom of Nanzhao ( modern day Yunnan) had become a credible threat to Chinese power in the region,resulting in the Tang invasion of Nanzhao in 863.
/u/DrDickles has previously answered the following question:
/u/EnclavedMicrostate has previously answered Why didn't China split into different countries?