I would imagine there are either inerting protocols in place or provisions for venting in all antimatter situations.
An antimatter interting system would dump the antimatter against a really dense really heavy piece of something and let it 'burn itself out' in a controlled way, dumping the resulting particle bath and gamma-rays through a wave-guide. Such a system would be useful for small amounts. Larger tanks would have a venting system in place or an outright jettison system.
One other thing I forgot to mention is the different thinking of the TOS writers. Back then, they depicted antimatter as something more powerful than what we know today. Such as an ounce blasting half an atmosphere away and affecting a ship 30,000 km distant in "Obsession" or a small quantity enough to blast apart an Earth-sized space amoeba from the inside as in "The Immunity Syndrome". So I don't think in TOS there would be a way to inert the fuel. Jettison the pods containing the fuel, yes.
Terminology-wise, in "The Apple" they were specific that potency was being lost in the "antimatter pods" and these pods were mentioned to be ejectable whereas "The Doomsday Machine" they say specifically "the antimatter" which is much harder to assume that they meant "the antimatter fuel system" instead of the fuel itself. There just isn't enough context to go further than the fuel, IMHO.
Tangentially, in TNG, antimatter was made more-or-less harmless as evidenced by the antimatter show distraction in "Best of Both Worlds". It could destroy ships, but you'd need a whole lot more to do it.