Yes, you probably injured the dog yourself and it's trying to escape. Dogs that get in that state can calm down, at least sometimes.
I'd try, with no guarantee of success for any attempt, the following:
1. Leave the area (more than 3 overworld tiles), and then return.
2. Release the dog in a building, leave and close the door, move away and return as before.
3. Release the dog in a large enclosure, such as your homestead if it's completely enclosed, or on an island, move and return as before.
4. Release the dog into the wilderness (e.g. just outside of the homestead) and let it run, and hope it calms down and returns.
Note that it's quite possible the dog may attack your character shortly after being release, so I'd try to have some means to escape without hurting it (such as climbing over a fence). I'd expect the dog to eventually calm down in that scenario, especially if you leave and return.
Again, no guarantees any of this will work, but animals usually calm down, and I've had animals in the past that were hit accidentally, fled, and returned after calming down, as well as dogs that calmed down while tied to a tree, but they can remain stuck in flight mode while tied to something.