In most cases, if the dog was running loose, the owner would be found negligent, which means you're not responsible for the accident, even if the dog dies. While you may feel awful, you wouldn't be responsible for any costs related to the dog's end-of-life treatment or burial fees, legally or financially.
If you're found to be responsible for the accident due to driving under the influence or intentionally swerving to hit the dog, you could be responsible for compensation to the owners. Intentional damage is often excluded from coverage by insurers as well, so if you intentionally injure a pet, you'll most likely have to cover any vet bills, end-of-life care, or burial costs yourself.