Yup, it's oil. If you've ever overfilled the crankcase on a small OHV engine like a Honda snowblower (like I have), it will puke the white frothy stuff out the value cover. What's happening is the oil is getting aerated through cavitation and it bubbles too high into the values and then comes out the valve cover in an engine. But in an air compressor it has an easier path to the tank, and thus resides there. This is especially true if the tank is new or in good shape on the inside (little rust). As it ages, you'll still get the white frothy stuff but the rust colours it brown. Your oil sump could also be contaminated with water if you are seeing excessive amounts of this froth. Changing your oil more frequently will help likely, because it should remove water contaminated in the sump.
In hydraulic systems the first sign of water contamination is milky fluid. Too much cavitation and you may see froth. The danger is that froth lacks the lubrication properties that the oil should have, and can cause damage in hydraulic or engine systems. It's less of an issue in a compressor pump, unless it is caused by aeration in the sump. Do a hot oil change and a lengthy drain. Then change the oil. This is the first fix you should do. If you still get lots of froth you may have a pump/cylinder issue, often ring related or a weak valve can cause this too. But try swapping the oil first if you haven't done so for a while; it could be contaminated.