Optimal control problems with oscillation (chattering controls) and concentration (impulsive controls) can have integral performance criteria such that concentration of the control signal occurs at a discontinuity of the state signal. Techniques from functional analysis (extensions of DiPerna-Majda measures from the partial differential equations literature) are developed to give a precise meaning of the integral cost and to allow for the sound application of numerical methods. We show how this can be achieved for the Lasserre hierarchy of semidefinite programming relaxations. This includes in particular the use of compactification techniques allowing for unbounded time, state and control.