Lets be clear, we are talking about two things - "to the death" of the State, ala another nation, kingdom, republic or etc., and second the overlapping concept of 'Total War'. Neither scenario literally means total murder of every single person.
Fighting to the death of a rival State was rare but not unheard of. I can think of a few off the top of my head: The Norman invasion of England saw the permanent and quite thorough overthrow of the Saxon regime which had preceded it. The Burgundian Wars ultimately ended the well developed State of the Valois Duchy of Burgundy when the Swiss killed Duke Charles the Bold at the Battle of Nancy. The Mongols annihilated several polities on the Eastern fringes of Europe (like the Principality of Kiev) in the 13th through 16th Century, as did the Ottomans from the 15th through the 17th. (The Ottomans destrroyed the Byzantine State as the most prominent example, though there were many smaller ones). Others were converted into Satraps which were effectively new States (with the old regime murdered and thousands of citizens impaled or enslaved). The War between the Conquistadors The War of the Roses in England ended in virtual annihilation of the Lancastrian side. The Albigensian Crusade was fought to the annihilation of the Cathars, the Northern Crusades were fought to the annihilation of the native Prussians, though the Lithuanians proved to be a harder nut to crack.
Total War was also not unheard of and was widely practiced during the 30 Years War in the 17th Century which saw the massacre of the population of the entire city of Magdeburg for example, and a hitherto unusually widespread mass-murder of civilians. The same occurred during the Hugujenot Wars in France.
During the Napoleonic Wars, several States were at least temporarily overthrown and re-created as "Revolutionary" puppets of the French Empire. And so on.