You have to re home the dog. He is prey driven.. by the accounts you have described such as pacing fences and fixating on the animals. Sure you can train him not to go after the animals when you are about.. but if he ever gets loose on his own he will go for the animals.. its just in your dogs nature.. he is not consciously being bad. Now he has had the thrill of the hunt he will always crave it... and no treats or training or petting will come close to the reward he will feel when he is hunting the animals. The other option is to build a large secure dog run for him to live in... but you need to let him out for a run with you every day or I think its cruel to keep a dog confined all its live in a run. So sorry for your goats.. wish you good luck with their recovery.