This paper extends the theory of regular solutions (C1 in a suitable sense) for a class of semilinear elliptic equations in Hilbert spaces. The notion of regularity is based on the concept of G-derivative, which is introduced and discussed. A result of existence and uniqueness of solutions is stated and proved under the assumption that the transition semigroup associated to the linear part of the equation has a smoothing property, that is, it maps continuous functions into G-differentiable ones. The validity of this smoothing assumption is fully discussed for the case of the Ornstein-Uhlenbeck transition semigroup and for the case of invertible diffusion coefficient covering cases not previously addressed by the literature. It is shown that the results apply to Hamilton-Jacobi-Bellman (HJB) equations associated to infinite horizon optimal stochastic control problems in infinite dimension and that, in particular, they cover examples of optimal boundary control of the heat equation that were not treatable with the approaches developed in the literature up to now.