Electrostatic interactions in slabs of polarizable particles