Wow, that could have turned out bad. My GSD went through one of the window panes in the garage door, suspected the mailman was cutting between the garage door and car. He was not as lucky and required some medical attention. You're lucky this time.
You really need to work on his reacting to the neighbors dog. It could happen again.