The defined integral of the first partial derivative of a function $f=f(x,y,z)$ is
$\int_{a}^{b} \frac{\partial f}{\partial z} dz = f(x,y,b)-f(x,y,a)$.
So if $f$ is a periodic function in $z$ on the $[a,b]$ interval then $f(x,y,a)=f(x,y,b)$ and the result of the integral is 0. Please correct me if I am wrong.
The question is what happens for the integral of the second derivative
$\int_{a}^{b} \frac{\partial^2 f}{\partial z^2} dz$
for a periodic and a non-periodic function.
Yes, you are correct (assuming suitable regularity of $f$). If $f$ is periodic, then so are its derivatives. This follows from differentiating the periodic condition: $$f(z + p) = f(z)$$ The period $p$ is constant.
So if $f$ is periodic with period $b-a$, then so is $\frac{\partial f}{\partial z}$ Therefore you can apply your original result to $\frac{\partial f}{\partial z}$ instead of $f$ to get $$\int_{a}^{b} \frac{\partial^2 f}{\partial z^2} dz = 0$$
For a non periodic function, all you can say is
$$\int_{a}^{b} \frac{\partial^2 f}{\partial z^2} dz = \frac{\partial f}{\partial z}(x,y,b)-\frac{\partial f}{\partial z}(x,y,a)$$