A Weierstrass-like theorem for real separable Hilbert spaces