The numerical treatment of the whole process of ductile fracture remains a challenging task, particularly when FEM is employed. The main issue regards pathologically mesh dependence of the numerical results, not only in the softening regime but also in the stages of strain localization and further crack propagation. In the literature, non-local approaches are adopted to mitigate these effects but they require a calibrated length scale and mesh refinement, thus being time consuming. This work focuses on the numerical treatment of ductile fracture in metal materials via a three-dimensional unified methodology that combines (i) the GTN model to describe diffuse damage using the standard FEM, the (ii) XFEM to represent the crack and (iii) the coupling of the XFEM with a cohesive zone model to account for the intermediate localization phase. We rely upon the Updated Lagrangian formulation to include large strains and rotations. The methodology, implemented in Abaqus commercial code as a user finite element (UEL), is capable of reproducing numerically the overall response of structures until rupture.