Generalised semiclassical formalism for two-photon resonant problems