Phantom limb/severed nerve pain

Our little Schnauzer Louie is four weeks out from surgery and is still having this pain. He may yip or he may scream out for up to half a minute. It’s heartbreaking, as you can imagine. His surgeon said it will eventually pass. He’s going to rehab next week. Any thoughts or help? Thanks.