Cap off the neutral with a wirenut, connect the ground to the "neutral" bar in your disconnect
Since your heat pump does not need the neutral, you simply cap it off with an appropriately sized wirenut. The ground, then, lands on the ground bar in your disconnect (even though it gets called a neutral bar, it's really a ground bar here). That way, everything is safely grounded, and the neutral's available in case the heat pump circuit gets repurposed for something else that actually needs it.
Also, did your installer pull a no-no?
Whoever ran the circuit to this disconnect apparently pulled NM cable through the conduit, which is a no-no as NM can't be used in wet locations (such as the inside of an exterior conduit), atop being an impractical nightmare to pull through conduit. The correct thing to use instead would be a set of 10AWG THHN/THWN wires; it shouldn't be hard to fix, though, thankfully, as with the breaker off, you can yank the NM out of the conduit and run THHN in its place, although you may have to add a junction box at the other end of this conduit run to transition between the THHN-in-conduit and NM.
(The reason why I can figure out it's NM from all the way over here is because the paper separator present in NM (and AC) but not in wet-location cables such as UF is visible poking out from the fitting at the bottom right of the box, by the way.)