We propose a modular anomaly equation for the prepotential of the N=2* super Yang-Mills theory on R^4 with gauge group U(N) in the presence of an Omega-background. We then study the behaviour of the prepotential in a large-N limit, in which N goes to infinity with the gauge coupling constant kept fixed. In this regime instantons are not suppressed. We focus on two representative choices of gauge theory vacua, where the vacuum expectation values of the scalar fields are distributed either homogeneously or according to the Wigner semi-circle law. In both cases we derive an all-instanton exact formula for the prepotential. As an application, we show that the gauge theory partition function on S^4 at large N localises around a Wigner distribution for the vacuum expectation values leading to a very simple expression in which the instanton contribution becomes independent of the coupling constant.