Extracting the unresolved pulsar contribution to the gamma-ray background