A refined Jensen's inequality in Hilbert spaces and empirical approximations