It's been stated above, I agree...
It's not a lack of fear of death. I'd say it's a matter of having greater love of their friends. That's understandable.
Plus, as Star Fleet officers they have greater training in life-and-death matters, along with oaths to give their lives and all that.
Well put. That's how I see it as well. True that you can have less fear when you've lived a full life and have not much unfinished business, but it's still hard to be completely fearless. Their dedication to each other is on a level far beyond what you find in human society these days. As someone else pointed out, self sacrifice in the battle scenario tends to be done with very little time to contemplate it.