We study the joint effect of dynamical friction, tidal torques and cosmological constant on clusters of galaxy formation. We show that within high-density environments, such as rich clusters of galaxies, both dynamical friction and tidal torques slow down the collapse of low-v peaks producing an observable variation in the time of collapse of the perturbation and, as a consequence, a reduction in the mass bound to the collapsed perturbation. Moreover, the delay of the collapse produces a tendency for less dense regions to secrete less mass, with respect to a classical spherical model, inducing a biasing of over-dense regions toward higher mass. We show how the threshold of collapse is modified if dynamical friction, tidal torques and a non-zero cosmological constant are taken into account and we use the Extended Press-Schecter (EPS) approach to calculate the effects on the mass function. Then, we compare the numerical mass function given in D. Reed, Mon. Not. R. Astron. Soc. 346, 565 (2003) with the theoretical mass function obtained in the present paper. We show that the barrier obtained in the present paper gives rise to a better description of the mass function evolution with respect to other previous models, R. K. Sheth and G. Tormen, Mon. Not. R. Astron. Soc. 308, 119 (1999) and R. K. Sheth and G. Tormen, Mon. Not. R. Astron. Soc. 329, 61 (2002).