Agent Smith is incapable of considering the validity of a life without purpose. He argues that he is better than Neo (and humans altogether), because he has a purpose.
Although they don't speak, the same is presumably true of the sentinels. They are built for a purpose, and will therefore do everything they can to fulfill this purpose.
If their purpose is to fight, then they will fight.
An alternate answer, which is a bit more broad and philosophical.
We know that robot uprising is similar to the slave uprisings. Robots wanted certain rights, such as right to life, which I guess means right to existence.
Although it was initially sparked by a robotic rights debate; that is not the actual start of the First Machine War.
The robots that survived this massacre gave up on their movement and began a mass exodus to Mesopotamia where they established the machine nation 01. Zero One's production of cheap goods caused the devaluation of human currency, creating a global economic crisis, which prompted the United Nation to blockade and ultimately declare war against the machine nation.
The robotic rights movement was a spat, but then avoided by robots going to live off on their own in 01. Humans again attacked, and this is where the robots first retaliated.
But I don't think you can argue that just because the machines want the right to live, that they would not have units who are still willing to die fighting.
The fact that the machines actively chose to retaliate proves that they understand the concept of "some deaths to ensure the majority's survival". If they had a strict "no machine death" policy, then they would not have fought an open war (unless they could guarantee no machine casualties).
- Humans argue the same right to live, yet some still willingly sign up for the military or commit violent crimes. Machines should be as willing to stand up and defend their race as humans are.
- Robots consist of two things: the hardware and the program. Unlike humans, robots can swap these out at will. Just because a Sentinel dies, does not mean that the program (individual) itself dies. Maybe it gets reuploaded to a new body, similar to the Cylons in the Battlestar Galactica remake.
- During the trilogy, we see that (some) machines are starting to make the same mistakes that humans made in the past. Arrogance, an inflated sense of self worth, individuals going against the collective, changing and conflicting ideals, guessing and estimating, ... Maybe the machines have also made the mistake of starting a eugenics system (or their equivalent), where the sentinels are "altered" programs, who are not free to think for themselves. Their behavior (from what we see) seems more akin to that of an animal rather than an creature with higher cognitive capacities, so maybe they are the machine-equivalent of animals (dogs of war).