That's the strength of Dirac's formulation compared to the wave-mechanics approach. A pure state is represented by a normalized state vector ##|\psi \rangle## (more precisely the ray, but that's irrelevant for this debate). Then ##\hat{H}## has a complete set of (generalized) eigenvectors ##|E \rangle## (let's for simplicity also forget about the common case that the Hamiltonian is non-degenerate). Then the probability that a system prepared in this state has energy ##E## is according to the Born rule given by
$$P(E)=|\langle E|\psi \rangle|^2,$$
and thus
$$\langle E \rangle = \sum_E P(E) E=\sum_E \langle \psi|E \rangle \langle E|\hat{H} \psi \rangle = \langle \psi|\hat{H} \psi \rangle.$$
The latter expression can now be written in any other representation you like. In the position representation you have, e.g.,
$$\langle E \rangle = \int \mathrm{d}^3 \vec{x}_1 \int \mathrm{d}^3 \vec{x}_2 \langle \psi |\vec{x}_1 \rangle \langle \vec{x}_1|\hat{H}|\vec{x}_2 \rangle \langle \vec{x}_2 |\psi \rangle=\int \mathrm{d}^3 \vec{x}_2 \int \mathrm{d}^3 \vec{x}_2 \psi^*(\vec{x}_1) H(\vec{x}_1,\vec{x}_2) \psi(\vec{x}_2).$$
Now you only have to calculate the matrix element. For the potential it's very simple:
$$V(\vec{x}_1,\vec{x}_2)=\langle \vec{x}_1|V(\hat{x})|\vec{x}_2 \rangle=V(x_2) \delta^{(3)}(\vec{x}_1-\vec{x}_2).$$
For the kinetic part, it's a bit more complicated, but also derivable from the Heisenberg algebra of position and momentum operators.
The first step is to prove
$$\langle \vec{x}|\vec{p} \rangle=\frac{1}{(2 \pi)^{3/2}} \exp(\mathrm{i} \vec{x} \cdot \vec{p}).$$
For simplicity I do this only for the 1-component of position and momentum. That the simultaneous generalized eigenvector of all three momentum components factorizes is clear.
Since ##\hat{p}## is the generator of spatial translations, it's intuitive to look at the operator
$$\hat{X}(\xi)=\exp(\mathrm{i} \xi \hat{p}) \hat{x} \exp(-\mathrm{i} \xi \hat{p}).$$
Taking the derivative wrt. ##\xi## it follows
$$\frac{\mathrm{d}}{\mathrm{d} \xi} \hat{X}(\xi)=-\mathrm{i} \exp(\mathrm{i} \xi \hat{p}) [\hat{x},\hat{p}] \exp(-\mathrm{i} \xi \hat{p}).$$
From the Heisenberg commutation relations this gives
$$\frac{\mathrm{d}}{\mathrm{d} \xi} \hat{X}=1 \; \Rightarrow \; \hat{X}=\hat{x}+\xi \hat{1}.$$
So we have
$$\hat{x} \exp(-\mathrm{i} \xi \hat{p}) |x=0 \rangle=\exp(-\mathrm{i} \xi \hat{p}) \hat{X}(\xi) |x=0 \rangle=\xi \exp \exp(-\mathrm{i} \xi \hat{p}) |x=0 \rangle.$$
Then you have
$$\langle x|p \rangle=\langle \exp(-\mathrm{i} x \hat{p}) x=0|p \rangle=\langle x=0|p \rangle \exp(+\mathrm{i} p x)=N_p \exp(\mathrm{i} p x).$$
The constant ##N_p## is determined by the normalization of the momentum eigenstate as
$$\langle p|p' \rangle=\delta(p-p')=\int \mathrm{d} x \langle p|x \rangle \langle x|p' \rangle=\int \mathrm{d} x N_{p}^* N_p \exp[\mathrm{i}x(p'-p)]=2 \pi |N_{p}|^2 \delta(p-p') \; \Rightarrow \; N_{p}=\frac{1}{\sqrt{2 \pi}}.$$
Of course, the choice of phase is arbitrary.
Now we can also evaluate the expectation value of kinetic energy easily
$$\left \langle \frac{\vec{p}^2}{2m} \right \rangle=\int \mathrm{d}^3 \vec{x} \mathrm{d}^3 \vec{p} \frac{p^2}{2m} \langle \psi|\vec{p} \rangle \langle \vec{p}| \vec{x} \rangle \langle \vec{x} |\psi \rangle=\int \mathrm{d}^3 \vec{x} \mathrm{d}^3 \vec{p} \frac{p^2}{2m} \frac{1}{(2 \pi)^{3/2}} \exp(-\mathrm{i} \vec{p} \cdot \vec{x}) \langle \psi|\vec{p} \rangle \psi(x)= \int \mathrm{d}^3 \vec{x} \mathrm{d}^3 \vec{p} \left [-\frac{\Delta}{2m} \frac{1}{(2 \pi)^{3/2}} \exp(-\mathrm{i} \vec{p} \cdot \vec{x}) \right ] \langle \psi|\vec{p} \rangle \psi(x) = \int \mathrm{d}^3 \vec{x} \int \mathrm{d}^3 \vec{p} \langle \psi|\vec{p} \rangle \langle \vec{p}|\vec{x} \rangle \left (\frac{-\Delta}{2m} \right) \psi(\vec{x}) = \int \mathrm{d}^3 \vec{x} \psi^*(\vec{x}) \left (-\frac{\Delta}{2m} \right) \psi(\vec{x}).$$
So it's not just written down but derived from the fundamental postulates + the specific realization of a quantum theory based on the Heisenberg algebra. To derive the latter from the Galilei group alone is a bit more lengthy. See Ballentine, Quantum Mechanics for that issue (or my QM 2 lecture notes which, however, are in Germany only:
http://fias.uni-frankfurt.de/~hees/publ/hqm.pdf ).