Heavily obscured and Compton-thick AGN are missing even in the deepest X-ray surveys, and indirect methods are required to detect them. Here we use a combination of the XMM-Newton serendipitous X-ray survey with the optical SDSS, and the infrared WISE all-sky survey in order to check the efficiency of the low X-ray to infrared luminosity selection method in finding heavily obscured AGN. We select the sources which are detected in the hard X-ray band (2 − 8 keV), and also have a redshift determination (photometric or spectroscopic) in the SDSS catalogue. We match this sample with the WISE catalogue, and fit the spectral energy distributions (SEDs) of the 2 844 sources which have three, or more, photometric data-points in the infrared. We then select the heavily obscured AGN candidates by comparing their 12 µm AGN luminosity to the observed 2-10 keV X-ray luminosity and the intrinsic relation between the X-ray and the midinfrared luminosities. With this approach we find 20 candidate heavily obscured AGN and we then examine their X-ray and optical spectra. Of the 20 initial candidates, we find nine (64%; out of the 14, for which X-ray spectra could be fit) based on the X-ray spectra, and seven (78%; out of the nine detected spectroscopically in the SDSS) based on the [OIII] line fluxes. Combining all criteria, we determine the final number of heavily obscured AGN to be 12-19, and the number of Compton-thick AGN to be 2-5, showing that the method is reliable in finding obscured AGN, but not Compton-thick. However those numbers are smaller than what would be expected from X-ray background population synthesis models, which demonstrates how the optical-infrared selection and the scatter of the L x −L MIR relation introduced by observational constraints limit the efficiency of the method. Finally, we test popular obscured AGN selection methods based on midinfrared colours, and find that the probability of an AGN to be selected by its mid-infrared colours increases with the X-ray luminosity. The (observed) X-ray luminosities of heavily obscured AGN are relatively low (L 2−10keV < 10 44 erg s −1 ), even though most of them are located in the "QSO locus". However, a selection scheme based on a relatively low X-ray luminosity and mid-infrared colours characteristic of QSOs would not select ∼ 25% of the heavily obscured AGN of our sample.