Mercury oxide is sometimes used in the production of mercury as it decomposes quite easily. When it decomposes, oxygen gas is generated.
It is also used as a material for cathodes in mercury batteries.