We investigate the evolution of the surface density of a circumbinary accretion disc after the mass loss induced by the merger of two supermassive black holes. We first introduce an analytical model, under the assumption of a disc composed of test particles, to derive the surface density evolution of the disc following the mass loss. The model predicts the formation of sharp density peaks in the disc; the model also allows us to compute the typical time-scale for the formation of these peaks. To test and validate the model, we run numerical simulations of the process using the smoothed particle hydrodynamics code phantom, taking fluid effects into account. We find good agreement in the shape and position of the peaks between the model and the simulations. In a fluid disc, however, the epicyclic oscillations induced by the mass loss can dissipate, and only some of the predicted peaks form in the simulation. To quantify how fast this dissipation proceeds, we introduce an appropriate parameter, and we show that it is effective in explaining the differences between the analytical, collisionless model and a real fluid disc.