On the Feynman-Hellmann theorem in quantum field theory and the calculation of matrix elements