You can treat them like they are the unfeeling bits of data they are, replaceable and disposable. But then, what's the point. Why bother protecting your fort from invaders and were beasts if you don't care about them.
For me, the game is so much more fun if you get attached to the hapless crazy dwarves. If you get inside their heads a little and know their stories more. It makes their triumphs mean more, and their downfalls more tragic. Maybe it makes you try a little harder next time your fort gets wiped out. Here are some ways to do that.
Name your dwarves. Give them a custom nickname. It doesn't have to be all of them. Might I suggest your starting seven and then after that - militia captains, people in your fort you really like such as a skilled armorer, gem cutter, weapons crafter, scholars and such. If one of your dwarves does something noteworthy like do well during a battle or punch an enemy to death bare handed, give them a name.
There are a lot of benefits to doing this. You get to know them better. It helps you not put your best weaponsmith or your chief medical dwarf in the military by mistake. If one of your starting 7 is constantly in danger because they are outside the fort at the start of sieges, you learn that about them in a way you wouldn't if they are just another urist axehammer.
I get a lot of pushback every time I make that suggestion, and it comes in the form of this. "Oh, that's so much work." And I get it, when 30 migrants show up at once, it is. So I have a kind of a formula I use to name them to make it easier. I name them after combinations of things they like, most often. This means you get a lot of names like greenaxe, glasteel or pinkjade. Sometimes I name them after what they are like, so you might find a Happy or Grouchy or Scaredy running around my fort. Some get named for their jobs right away like Armor the armorer or Dr. Cox, the chief medical dwarf.
I'm not suggestion you have to name every last one in your fort, because you're not going to get to know every last one of them any way. But if you do, when you see keep running into them, you'll know it, and when something good or bad happens to them you'll know more who it is. Also I like using Dwarf Therapist to make it faster.
Next tip. See what they are doing. Click on a dwarf if you have DF Hack or select one using the units list. They will tell you what they are doing and their skills. If you hit f for follow on this screen the viewpoint automatically follows them around as they go about their tasks. Or goof off. Whatever they are doing. Just doing this can be extremely informative.
Ask them what they are thinking about. When you have a dwarf selected hit z to see their status and then enter to see their thoughts.
You can see their current mood or thoughts, and the things that influenced these recently. You can see their likes and dislikes
Going back to that status screen if you hit r you can see their relationships. You can tell which dwarves or other people, even animals, they have been spending the most time with because they will be better friends with them.
Get to know the history of your world.
You don't even need to retire you fort to do it if you're using DF Hack. You can just exportlegends and open up your world in legends viewer. I'm not going into a whole thing about how to do it, but here's some things you can meaningfully get out of it fairly easily
How is your civilization doing? Does it have a lot of sites? Very few? Have they been getting wiped out a lot lately? Anything interesting happen in the history of your civ? Did your kings die of natural causes, or get turned into night creatures? How are the other civlizations around you doing? Anyone expanding, any goblins winning wars around them?
You can find out the history of people who joined your fort by way of petitions. A musical troupe will have a history in your world. For instance, the group the Mysterious Plants applied to be citizens of Swampcavern, and we thought their name was so ridiculous that we had to let them in.
Ngerxung Maliceally is a goblin poet whose goal is to take over the world. Her best friend in the world is a male human Pibang and equally as much, an unnamed giant cave spider.
She started life as a farmer and gave that up to become a poet. She was apprenticed to the elf Mimale Typhoonstoked and became a member of the Mysterious Plants.
Mimale was briefly the mayor in swampcavern and had two apprentices ever, Ngerxung and Nisa Murderfish, which is an amazing name.
I wouldn't know most of this stuff without opening Legends Viewer.
It's also good if you ever want a summary of everything someone did in your fort, every artifact they made, battle they lived through, when they switched occupations, every masterful meal or weapon.
See what kind of books your people are writing.
It's got to give you some kind of insight about what is on their minds. Sometimes they even write about their own fort.
Make statues and engravings
If you make a statue of a historical figure, but let the artist choose, they might make a stature of when they were hired as militia captain, or when they were fired, or of them surrounded by some kind of creature they hate.
If you make engravings about your region or your fort the artist might choose any event old or recent. They might depict events that happened during the life of your fort that you were unaware of, like when one forgotten beast killed another in the caves you could not even see.
This may seem like a stretch when it comes to getting to know your dwarves, but things depicted in engravings can show up, whether it's a lady consort that applies for citizenship, and she's from a civ that you made an engraving of their queen being crowned in the year 73. Or if there is a hydra or dragon in your region it may well show up at your fort some day.
If you see people telling stories, dancing or reciting poetry you can click on them for more details. You can even find out what the story is about.
Any more advice?