Good question! Any kind of substitution would have to be justified. It boils down to whether the last result extends to complex 's. I'll need to think about this a while.
I'm not familiar with a uniqueness principle. All I know is that when is real valued and , the integral diverges. I don't know for what imaginary or complex values the integral is convergent. Substituting does lead to the correct solution, though.
EDIT: It should be OK if I can show that and actually converge.
The question of whether an identity involving a real parameter can extended to complex values comes up a lot in complex analysis. There's more to it than just showing that certain integrals converge. A reference for the uniqueness principle is Gamelin's book on complex analysis. He addresses questions very similiar to the one you're considering.