Once on purpose years ago, decades even, when I was much, much younger. More recently only by mistake, and never badly enough to require a Doctor.
Someone on this forum several years ago got a mistake bite that required stitches from her dog and she came back to warn us all. Don't tell the Doctor or Hospital the bite came from your own animal. Most are required to report bites to Health of Animals and your animal could end up being quarantined and having a bite report entered. Her dog was quarantined. Your dog will be quarantined if it has been vaccinated for rabies. You may be allowed to quarantine at home but if your home and yard is deemed not secure enough you may have to foot the bill at an approved facility.
If your dog/cat is not vaccinated, well then I'm not sure what will happen. But the only way I know of to see if the animal might have rabies is to destroy it and examine brain tissue.
Sorry OP, off track a bit.