Pain, fear and suffering is part of life and we are very resilient. What may seem unbearable in the moment will seam like nothing once it's passed. We endure plenty throughout life.
A heart attack is fairly quick. I would much prefer that to a long battle with dementia or certain cancers.
I've wavered between wanting to die in my sleep and not, but as of right now I'm back to wanting to be awake. Death is an experience we only have once. I don't think there will be anything left to remember the experience, but it would be cool to experience it nonetheless. Even things that are painful can be fulfilling experiences, and death is the final one.
But there is no point in worrying about it until it comes knocking. What you can do today is prepare your final will, and make your resuscitation-request known, and opt into donating your organs - but knowing how you'll feel about death once it nears is impossible.
You likely wont know when it is imminent, and you likely wont be able to reach for a gun when it does. Likely hospice workers will do their best yo minimise your suffering for you, so embrace your final moments when they come.