There are many self oxidizing solid fuels out there, but most of them contain elements that are very rare in organisms. Your four organic elements are hydrogen, carbon, oxygen and nitrogen. These elements are found abundantly in every organism. Any solid fuel made from just these 4 elements will be something your organism will have no problem producing enmasse. Beyond this, you have Calcium and Phosphorous which are the most dominant minerals in biology, but both are <1% of total biomass make them only usable if they are lesser ingredients to the explosive's compound. All other elements occur at rates of <0.1% of biomass making them very limiting if you want an organic explosive.
RDX is the active ingredient in C4 and many other military grade explosives and propellants. It is a self oxidizing compound made purely of biological elements with a chemical formula of C3H6N6O6. While there are not Earth based organisms that naturally produce RDX, its chemical formula would be something perfectly plausible for an organism to be able to synthesize a lot of because of the elements that are used.
As a solid crystal or large grain powder RDX explodes very violently; however, by griding it down into finer particles, you can slow its chain reaction making it a suitable rocket fuel or propellant.
Designing an Organism around RDX
The biggest advantage from a biology standpoint about RDX is that is is actually a very stable explosive. You can drop it, shake its, leave it outside on a hot day, etc. and it will not explode. This is very important if you are planning any sort of animal since blowing up when you trip will cause the explosiveness gene to very rapidly be selected against. Because RDX generally takes some kind of high temperature spark, or other explosive to trigger it, your animals could evolve to only explode at moments when exploding offers an evolutionary advantage like when a predator has you in its jaws. This way, explosiveness can be selected for the same way that suicide stingers were selected for in bees. One dies, and but saves the colony, ensuring the continuance of its genetic line. The shock resistance of RDX also means it will typically not chain react from one critter to another when your organism blows up which would otherwise risk wiping out your entire colony.
If you want your critters to be able spontaneously combust, you need to give them a detonation organ. This could be something like a small pair of bladders containing a 2 part room-temperature explosive that could be mixed when needed. Or your critter could have a bioelectric organ that could set the explosive off.