We consider an optimal control problem described by a second order elliptic boundary value problem, jointly nonlinear in the state and control with high monotone nonlinearity in the state, with control and state constraints, where the state constraints and cost functional involve also the state gradient. Since no convexity assumptions are made, the problem may have no classical solutions, and so it is reformulated in the relaxed form using Young measures. Existence of an optimal control and necessary conditions for optimality are established for the relaxed problem. The relaxed problem is then discretized by using a finite element method, while the controls are approximated by elementwise constant Young measures. We show that relaxed accumulation points of sequences of optimal (resp. admissible and extremal) discrete controls are optimal (resp. admissible and extremal) for the continuous relaxed problem. We then apply a penalized conditional descent method to each discrete problem, and also a progressively refining version of this method to the continuous relaxed problem. We prove that accumulation points of sequences generated by the first method are admissible and extremal for the discrete relaxed problem, and that accumulation points of sequences of discrete controls generated by the second method are admissible and extremal for the continuous relaxed problem. Finally, numerical examples are given.