Yes.

The pain will pass. It also stops the chance of him making unwanted puppies if he manages to break out of the back yard.