If I had no memories of the experience, and it had no long term physical affects on me, I would be indifferent, obviously, because I don't know about it.
If I were to die from it, I see no advantage to a painless death over a painful death, other than for those around me. I will have no memory of the incident.
Those minutes/hours/days spent experiencing pain do count. You speak as of the after-effects but make it seem that an advantage in living the process itself doesn't count.
That's like saying that we're all going to die anyway and there's no advantage to how we live our lives. So why bother with anything?
What reason do you have to believe otherwise. What does it count towards?
What counts is in missed opportunity. Missed abilities to affect the world around you before you leave. Pain at the very end doesn't alter that much at all.