Registration methods are used in the meshing field to ``adapt’’ a given mesh to a target domain. Finite element method (FEM) is applied to the resulting mesh to compute an approximate solution to the system of partial differential equations (PDE) representing the physical phenomena under study. Prior to FE analysis the Jacobian matrix determinant must be checked for all mesh elements. The value of this Jacobian depends on the configuration of the element nodes. If it is negative for a given node, the element is invalid and therefore the FE analysis cannot be carried out. Similarly, some elements, although valid, can present poor quality regarding Jacobian-based indicator values, such as the Jacobian ratio. Mesh registration procedures are likely to produce invalid and/or poor quality elements if the Jacobian parameter is ignored. To repair invalid and poor quality elements after mesh registration, we propose a relaxation procedure driven by specific validity and quality energy formulations derived from the Jacobian value. The algorithm first recovers mesh validity and further improves elements quality, focusing primarily on nodes that make the elements invalid or of poor quality. Our novel approach has been developed in the context of non-rigid mesh registration and validated on a data set of 60 clinical cases in the context of orthopaedic and orthognathic hard and soft tissues modelling studies. The proposed repair method achieves a valid state of the mesh and also raises the quality of the elements to a level suitable for commercial FE solvers.