Ground states of semilinear elliptic equations: a geometric approach