Unfortunately there is no ointment to prevent chalazion formation. you will have to keep up the hot fomenting and also do regular lid massaging to express out the secretions of the glands in your eye lids. The massage is carried out by rolling your forefinger over your lids (the direction is always towards the lid margin... which is downwards for the upper lid and upwards for the lower lid). You can do this when you take a bath or when you are doing the hot fomentation.
This will help express out the secretions out of the glands on a regular basis. This goes a long way in preventing chalazion formation.
If you have any associated irritation , you may need lubricating eye drops due to tear film disturbance. if this is the case, consult your Ophthalmologist for an opinion.