Energy contributions of Hamiltonian density In Lancaster and Blundell, Quantum Field Theory for the Gifted Amateur, p.99, the Hamiltonian density is
\begin{equation}
\mathcal{H}=\frac{1}{2}[\partial_0\phi(x)]^2+\frac{1}{2}[\nabla\phi(x)]^2+\frac{1}{2}m^2[\phi(x)]^2,\tag{11.5}
\end{equation}
and it tells us that the energy has contributions from

*

*a kinetic energy term reflecting changes in the configuration in time,


*a 'shear term' giving an energy cost for spatial changes in the field, and


*a 'mass' term reflecting the potential energy cost of there being a field in space at all.
In the equation above, i think the first term is the same as the classical mechanics. But i don't understand why second (shear) and third (mass) term are represent potential energy.
 A: You can discretize the Klein-Gordon (KG) field $\phi$ as a displacement variable in a lattice. Let us for simplicity consider 1+1D, i.e. we have an 1D equidistant lattice of point-particles. Let $\phi(x)$ denote the transversal$^1$ displacement of the point-particle with equilibrium position $x$. 


*

*The kinetic energy maps to kinetic energy.

*The potential gradient term can be reproduced by springs between nearest neighbors.

*The KG mass term can be reproduced by a spring between each point-particle and its equilibrium position.
For details, see this related Phys.SE post and links therein.
--
$^1$ Alternatively, instead of transversal displacement, one may consider longitudinal displacement.
A: Each of those terms represent the price to pay, in terms if energy, to have some specific configuration of the field: 


*

*configurations that change with time (price is estimated by time derivative)

*configurations that change with space (price is estimated by the gradient)

*magnitude of the field (mass plays a role in enhancing this effect)


All those terms appear with a plus sign, suggesting that the most energetically favorable configurations are those where the field is more uniform, stabile an small 
A: Actually the first two terms are kinetic part, and the last term is the potential energy. 
To get a correspondence to the classical mechanics, just consider the vibration of a string. When the string is displaced from equilibrium, a segment associated with the interval dx has a length:
$$dl = \sqrt{dx^2+d\psi^2}=dx\sqrt{1+(\frac{d\psi}{dx})^2}\approx dx\left[1+\frac{1}{2}(\frac{d\psi}{dx})^2\right]$$.
($\psi$ here is the displacement)
The potential is proportional to the string deformation:
$$dU\propto dl - dx = dx(\frac{d\psi}{dx})^2$$
This potential is due to the deformation of the string. The second term in the Hamiltonian is corresponding to this, which is related to the spatial changes in the field. 
I am not sure about the correspondence for the last term (potential term), but it's maybe corresponding to the potential of a oscillating spring (correct me if it's wrong):
$$T=\frac{1}{2}m\omega^2 x^2$$
