Abstract : In control theory, the term chattering is used to refer to strong oscillations of controls, such as an infinite number of switchings over a compact interval of times. In this paper we focus on three typical occurences of chattering: the Fuller phenomenon, referring to situations where an optimal control switches an infinite number of times over a compact set; the Robbins phenomenon, concerning optimal control problems with state constraints, meaning that the optimal trajectory touches the boundary of the constraint set an infinite number of times over a compact time interval; the Zeno phenomenon, referring as well to an infinite number of switchings over a compact set, for hybrid optimal control problems. From the practical point of view, when trying to compute an optimal trajectory, for instance by means of a shooting method, chattering may be a serious obstacle to convergence. In this paper we propose a general regularization procedure, by adding an appropriate penalization of the total variation. This produces a quasi-optimal control, and we prove that the family of quasi-optimal solutions converges to the optimal solution of the initial problem as the penalization tends to zero. Under additional assumptions, we also quantify the quasi-optimality property by determining a speed of convergence of the costs.