I'm very sorry you lost your bun. Like Aki said, rabbits are fragile, and there's no way to know if you got to the vet right away, if your bun could have been saved.
Just for future knowledge, true diarrhea in rabbits is considered an emergency because not only can they go downhill quickly from dehydration, but the form of diarrhea caused by the clostridium sp. bacteria, can be fatal very quickly so needs immediate correct treatment to have any chance of saving the rabbit. And to make sure the correct treatment is being done, you want to make sure you've picked out a very knowledgeable rabbit vet to go to, as not all 'rabbit' vets are good ones.
What might have caused the diarrhea is also something important to consider. Diarrhea in rabbits is usually caused by bacteria and/or improper foods. Foods like iceberg lettuce, and sometimes rabbits can be sensitive to other veggies causing problems. With the bacteria, it can be caused by diet as well, disrupting the rabbits microflora where the bad bacteria takes over. This can be from an excess of starches/sugars in the rabbits diet, especially for young bunnies as their digestion is more susceptible to these problems. Keeping the rabbits environment clean is also important to prevent the spread of bad bacteria. Mold is another cause for diarrhea, and that has to do with bad feed or hay.
Unfortunately many of us have also lost rabbits to sudden health issues, and it is a learning experience. The important thing is to learn as much as you can so that if you have rabbits again, they can benefit from your increased knowledge. I lost a rabbit several years ago, from a health issue that I didn't understand at the time. Now I have another rabbit with the same condition and because of what I learned after losing that first rabbit, I've known what to do to help him remain healthy. Most of us have felt the same way, as you always wonder what you should have or could have done differently. If you feel like there was something you should have done differently, then all I can say is learn from that, set the guilt aside, and learn as much as you can so that you can better help if you have another rabbit in your life.