The International Gamma-Ray Astrophysics Laboratory (INTEGRAL) satellite has yielded unprecedented measurements of the soft gamma-ray spectrum of our Galaxy. Here we use those measurements to set constraints on dark matter (DM) that decays or annihilates into photons with energies $Eapprox 0.02-2$ MeV. First, we revisit the constraints on particle DM that decays or annihilates to photon pairs. In particular, for decaying DM, we find that previous limits were overstated by roughly an order of magnitude. Our new, conservative analysis finds that the DM lifetime must satisfy $taugtrsim 5times 10^{26},{rm s}times (m_{chi}/rm MeV)^{-1}$ for DM masses $m_{chi}=0.054-3.6$ MeV. For MeV-scale DM that annihilates into photons INTEGRAL sets the strongest constraints to date. Second, we target ultralight primordial black holes (PBHs) through their Hawking radiation. This makes them appear as decaying DM with a photon spectrum peaking at $Eapprox 5.77/(8pi G M_{rm PBH})$, for a PBH of mass $M_{rm PBH}$. We use the INTEGRAL data to demonstrate that, at 95% C.L., PBHs with masses less than $1.2times 10^{17}$ g cannot comprise all of the DM, setting the tightest bound to date on ultralight PBHs.