The Markov-switching GARCH model allows for a GARCH structure with time-varying parameters. This flexibility is unfortunately undermined by a path dependence problem which complicates the parameter estimation process. This problem led to the development of computationally intensive estimation methods and to simpler techniques based on an approximation of the model, known as collapsing procedures. This article develops an original algorithm to conduct maximum likelihood inference in the Markov-switching GARCH model, generalizing and improving previously proposed collapsing approaches. A new relationship between particle filtering and collapsing procedures is established which reveals that this algorithm corresponds to a deterministic particle filter. Simulation and empirical studies show that the proposed method allows for a fast and accurate estimation of the model.