As Clever-Name implied above, you want to calculate ##\langle \psi \lvert \hat{H} \rvert \psi \rangle##, so calculating ##\hat{H}\psi(z)## is a good first step. You have
$$\hat{H}\psi(z) = -\frac{\hbar^2}{2m}\frac{d^2}{dz^2} \sqrt{\frac{10}{L_z}}\left(1-\frac{z^2}{L_z^2}\right).$$ So far so good. The problem is, the rest of what you wrote doesn't make sense. First, you claimed
$$-\frac{\hbar^2}{2m}\frac{d^2}{dz^2} \sqrt{\frac{10}{L_z}}\left(1-\frac{z^2}{L_z^2}\right) \rightarrow -\frac{\hbar^2}{2m}\frac{n^2\pi^2}{L_z}\left(1-\frac{z^2}{L_z^2}\right)$$ which is simply wrong. This is basic differentiation. I don't understand how you got your result if you know how to calculate a derivative. Next, you then somehow claim that your answer is of the form
$$E\sqrt{\frac{10}{L_z}}\left(-\frac{z^2}{L_z^2}\right)$$ which is obviously inconsistent with what you wrote earlier (what happened to the 1 inside the parentheses?). In fact, the relationship ##\hat{H}\psi = E\psi## only holds if ##\psi## is an eigenstate of the Hamiltonian, and the given wave function isn't an eigenstate.
You never said what the actual potential here is. I'm assuming you have an infinite square well as opposed to a finite square well.