In this paper we adopt a rational expectations framework to formulate general equilibrium models with heterogeneous agents. The productivity dynamics are characterized by a jump–diffusion model, thus allowing to account for sudden and impactful events. The modelling approach utilizes Hamilton–Jacobi–Bellman (HJB) formulations to represent the endogenous decision-making of firms to remain or exit the industry. When firms decide to exit, they are instantaneously replaced by new entrants. This dynamic leads to the development of a probability density function for firms, which satisfies a Kolmogorov–Fokker–Planck (KFP) equation with a source term. Both HJB and KFP formulations involve partial-integro differential operators due to the presence of jumps. Equilibrium models are completed with the household problem and feasibility conditions. Since (semi-)analytical solutions are not available, a numerical methodology is considered. This approach involves a Crank–Nicolson scheme for the time discretization, an augmented Lagrangian active set method and a finite difference discretization for the HJB formulation, and an appropriate finite difference method for the KFP problem. Moreover, Adams–Bashforth schemes are employed to handle integral terms explicitly. For the global equilibrium problem, we introduce a Steffensen algorithm. Numerical examples are provided to showcase the performance of our proposed numerical methodologies and to illustrate the expected behaviour of computed economic variables.