Is a military gas mask required or would a commercially available full face respirator such as those available on Amazon.com be adequate. The mask I have is full face and can support particulate and various chemical filter cartridges. Filter cartridge selection really depends on what chemicals you anticipate needing to walk/drive through.

One cartridge will protect against: Organic vapors.
A second cartridge protects against Chlorine, Hydrogen chloride, Sulfur dioxide and Formaldehyde.
Another cartridge protects against: Organic vapors, Sulfur dioxide, Chlorine, Hydrogen chloride, Hydrogen fluoride.
A fourth cartridge protects against Ammonia and Methylamine vapor.

Which of those cartridges would be best to stock for a derailment event? Which of those chemicals are you most likely to encounter?

Since the cartridges are stackable you can combine the various filters to accommodate all of the above although that would be a fairly long stack and inhaling resistance would increase. I recommend adding a particulate filter and pre-filter to stop larger airborne particles from clogging the chemical filters.