We study semilinear elliptic equations in a generally unbounded domain Omega subset of R-N when the pertinent quadratic form is nonnegative and the potential is generally singular, typically a homogeneous function of degree -2. We prove solvability results based on the asymptotic behavior of the potential with respect to unbounded translations and dilations, while the nonlinearity is a perturbation of a self-similar, possibly oscillating, term f(infinity) of critical growth satisfying f(infinity)(lambda(j)s)= lambda N+2/N-2 f(infinity)(s), j is an element of Z, s is an element of R. This paper focuses on two qualitatively different cases of this problem, one when the quadratic form has a generalized ground state and another where the presence of potential does not change the energy space. In the latter case we allow nonlinearities with oscillatory critical growth. An important example of such quadratic form is the one on RN with the radial Hardy potential -mu vertical bar x vertical bar(-2) with mu = mu(*) in the first case, mu < mu(*) in the second case, where mu(*) = (N-2)(2)/4 is the largest constant for which the energy form remains nonnegative.