Critical points on closed convex sets vs. critical points and applications