I would hope in such a circumstance that I'd remember the state regards my dogs as property.
Using a gun in a similar situation in my area could be legally dicey. This is where, if I were smaller and older, pepper spray might be wonderfully useful.
At my current age and in my present health, and not having spray, I think I'd probably be legally justified in using basic force to protect property. In my case, basic (unarmed) force is not inconsiderable. I'm not all that big, but I've been involved in various forms of martial arts on a fairly regular basis for nearly 30 years, and on a very regular basis for the last 16.
But I'm happy eppie did not lose his pup.
And I think laws should be changed to once again allow use of whatever force may be required to protect property. Call me inhumane, but I think states have given criminals an expectation that they will be able to go about their business unthwarted by us potential victims.