his death is acceptable after all other options failed
I don't see the hurry. The heroes could try out fifty different tricks before having to resort to something as idiotic as shooting themselves in the foot with a photon torpedo.
It's not as if
a) Data is doing anything directly threatening,
b) the heroes are out of things to try,
c) the child needing medical care would be minutes away from dying, or
d) whatever Data is doing would threaten to drag on for an excessively long time.
While Data just flies the ship forward, negating fear a), the heroes try out three or four perfectly sensible tricks, demonstrating fear b) to be unnecessary, and tend to the child in a way that shows fear c) not to exist, at which point Data takes the ship out of warp and negates fear d). At that point, taking control of the ship ceases to be a priority, and intercepting the newly mobile Data becomes the issue. Shooting photon torpedoes at him never is a viable or sensible option.