Ritz variational calculation for the singly excited states of compressed two‐electron atoms