I strongly suspect that most people who risk their lives do so precisely because it preserves their identity. There may also be a EDT aspect here where I value {me who would rush into a burning building to save another's life} more than {me who would not}. So if you have your identity invested at all into being a good person in that kind of way, I don't think this thought experiment will be isomorphic to the one in which you're under dangerous surgery.
There's also the matter that me-changed-enough-to-be-a-different-person is a new person, at least to the extent of the change, while someone trapped in a burning building already exists. Most people (I think for good reasons even on simple act utilitarianism, but that's another matter) value preserving life over creating new life.
I was reading about the effectiveness of bicycle helmet laws (here) and wondered how worthwhile it is to save your life at the expense of some aspect key to your current identity (Note that the paper linked doesn't say that this is the situation; this was just a tangential thought).
Let's say that I perform some activity that carries a 10% chance that I will die but otherwise carries no risk of injury. There is some piece of safety gear that I can wear that cuts that risk in half, but for some reason adds a 10% chance that I will be permanently brain damaged such that I will not be "me" as I understand it now. Should I rate this as 15% fatal with the safety gear or is there some other way that this should be evaluated?