Deterministic single-photon source in the ultrastrong coupling regime