Decomposition of degenerate Gromov–Witten invariants