Depending on the method and circumstances, the thoughts might be utterly different.
Once I was thinking that I am dying and it was something like "I accept the death if it comes"
But let's fantasize what they actually can be:
"It is sad to die because I have never lived before"
"Faster, faster! I am too anxious, I am tired of waiting"
"Well, this is going too quickly, my metabolism always surprises me"
"What if I stop now. There is nothing left, all the bridges are burnt to the pile"
"Shit, I want to take a pee"
"Did I clean all the traces on my phone?"
"If an officer was caught, he would take cyanide pill and it is noble because he would not become a traitor"
And so on...