OMG, I am so sorry for your unexpected loss, making it even harder to bear if that's possible.
It seems to me that you did nothing wrong in his care with the heat and everything right before, during, and getting him to the vet. From what you described, I would think that it was something other than the heat that caused him to collapse.
I will give my furbabies an extra hug today, and again, I am so sorry for your familys' loss.....