I've heard statistically that we could all expect at least one patient to die in our care - that being said, it certainly depends on the population you're treating. If you're a general dentist in a suburban area with a healthy, young to middle-aged patient base, your chances are low. If you're an OMFS doing in-office procedures on a fairly medically complex and compromised patient base, your chances are higher.
Things happen. Especially unexpected things: patient has an ongoing, undiagnosed medical condition and something you did set them over the edge; patient's time card is up and they have their stroke in your chair instead of standing in line at the grocery store; etc. These are sad, but it's hard for the dentist to anticipate these events.
For the other things - we as dentists can do a few things to prevent adverse events. One is case selection - choosing the appropriate procedures given the patient's medical history: you wouldn't want to do a full mouth extraction on a cardiac patient with uncontrolled diabetes and hypertension who is also currently undergoing chemotherapy treatment. Another is recognizing where the level of your training makes you competent. This speaks especially to the recent news stories of the deaths of children during or immediately after in-office general anesthesia or oral sedation. Determining if you've been appropriately trained in advanced behavioral techniques (in my opinion, a residency with extra training in sedation is probably better than a weekend course on the topic) and know what to do when the procedure start to go south, can help. If you've taken all the proper precautions, and a death still occurs, then it gets lumped in the category I previously described.
It's never easy to lose a patient - whether it happens in your chair or happens in the community. The beauty of dentistry is that we get to form lasting relationships with those we care for, so it can be hard. Reach out to the family if you can. And take care of yourself.