Context. Thanks to the detections of more than 3000 exoplanets these last 20 yr, statistical studies have already highlighted some properties of the distribution of the planet parameters. Nevertheless, few studies have yet investigated the planet populations from short to large separations around the same star since this requires the use of different detection techniques that usually target different types of stars. Aims. We wish to develop a tool that combines direct and indirect methods so as to correctly investigate the giant planet populations at all separations. Methods. We developed the MESS2 code, a Monte Carlo simulation code combining radial velocity and direct imaging data obtained at different epochs for a given star to estimate the detection probability of giant planets spanning a wide range of physical separations. It is based on the generation of synthetic planet populations. Results. We apply MESS2 on a young M1-type, the nearby star AU Mic observed with HARPS and NACO/ESO. We show that giant planet detection limits are significantly improved at intermediate separations (≈20 au in the case of AU Mic). We show that the traditional approach of analyzing the RV and DI detection limits independently systematically overestimates the planet detection limits and hence planet occurrence rates. The use of MESS2 allows us to obtain correct planet occurrence rates in statistical studies, making use of multi-epoch DI data and/or RV measurements. We also show that MESS2 can optimize the schedule of future DI observations.