Aww.
I'm really sorry to hear about your loss. I know it's not much consolation, but he'd lived a long life, and as you said, was doing well with his mind still intact. If anything, I'd say it's better for him to go like that than to have continued and lost his mind and his dignity.
If I were you, I'd write him that letter, as getting some of your thoughts out onto paper will help you to understand them better.
I've not lost a family member since I've been old enough to remember; but a friend of mine did die a few years ago suddenly from meningitis - and I remember how much that got to me, but I found that one day, for just a second, the shock/grief lifted, and after that, it was easier to keep going back to that time more and more.
As for your A-Level results; just try and remember how proud your grandpa would've been of you for getting those A-Levels; and remember to value them for that, as well as all of the hard work you've put into them.
Also, as difficult as it is not to, try not to think of your grandpa's death - especially since you're unsure of the way in which he died. It may well be that he died very peacefully in his sleep, so hold on to this image rather than the more negative one.
I hope everything goes okay for you, and you're welcome to PM me at any time if you'd like.