The study of phase transitions in dissipative quantum systems based on the Liouvillian is often hindered by the difficulty of constructing a time-local master equation when the system-environment coupling is strong. To address this issue, the complex discretization approximation for the environment is proposed to study the quantum phase transition in the extended Jaynes-Cumming model with an infinite number of boson modes. This approach yields a non-Hermitian effective Hamiltonian that can be used to simulate the dynamics of the spin. It is found that the ground state of this effective Hamiltonian determines the spin dynamics in the single-excitation subspace. Depending on the opening of the energy gap and the maximum population of excitations on the spin degree of freedom, three distinct phases can be identified: fast decaying, localized, and stretched dynamics of the spin. This approach can be extended to multiple excitations, and similar dynamics were found in the double-excitation subspace, indicating the robustness of the single-excitation phase.