The evaluation of avalanche release depths constitutes a great challenge for risk assessment in mountainous areas. This study focuses on slab avalanches, which generally result from the rupture of a weak layer underlying a cohesive slab. We use the finite-element code Cast3M to build a mechanical model of the slab/weak-layer system, taking into account two key ingredients for the description of avalanche release: weak-layer heterogeneity and stress redistribution via slab elasticity. The system is loaded by increasing the slope angle until rupture. We first examine the cases of one single and two interacting weak spots in the weak layer, in order to validate the model. We then study the case of heterogeneous weak layers represented through Gaussian distributions of the cohesion with a spherical spatial covariance. Several simulations for different realizations of weak-layer heterogeneity are carried out and the influence of slab depth and heterogeneity correlation length on avalanche release angle distributions is analyzed. We show, in particular, a heterogeneity smoothing effect caused by slab elasticity. Finally, this mechanically based probabilistic model is coupled with extreme snowfall distributions. A sensitivity analysis of the predicted distributions enables us to determine the values of mechanical parameters that provide the best fit to field data.