Mesoscopic simulation of non-ideal fluids with self-tuning of the equation of state