Sun Tsu said: "Study the five factors of warfare: Way, Heaven, Ground, General, and Law. Calculate your strength in each and compare them to your enemy's strengths." While he may have been speaking from an age of human armies facing human armies, his advice is universal and can be applied in this case.
The 'Way' is the strong bond your people have with you. Whether they face certain death or hope to come out alive, they never worry about danger or betrayal.
I am assuming your warriors are the kind that will stand behind you in this sort of fight. You've already indoctrinated them that this is a matter of life and death for the entire intelligent universe, so hopefully they won't betray you.
Your opponent has an advantage over you in terms of the Way. There is only one collective anthill, and its elements will die for their cause, not because they believe in it, but because they simply will. They lack the sapience to do otherwise.
'Heaven' is dark and light, cold and hot, and the seasonal constraints. 'Ground' is high and low, far and near, obstructed and easy, wide and narrow, and dangerous and safe.
The anthills have been here a long time. They understand the land far better than you do. Each anthill is going to be located in an easily defensible location.
However, we have space-faring travel. We can monitor the state of the planet across the world in real time. This gives us the advantage of the weather. Because we can move more weather-related data around, and move it faster, we can better predict the weather.
'General' is wise, trustworthy, benevolent, brave, and disciplined.
The anthill general may be a weakness. You mention that it is very expansionist, which means that, given a choice, it will choose to take territory rather than refining its control of the territory it has.
Your general I'm assuming is an excellent strategic mind, because that will make for the best story. I'm visualizing a Mazer Rackham for this scenario. If your general is less awesome than Mazer was, you may have to adjust this plan.
'Law' is organization, the chain of command, logistics, and the control of expenses.
I think this is where the battle gets interesting, because the command structure of a collective consciousness is so tremendously different from a normal army. A collective consciousness is going to have a loose hierarchy, rather than the rigid one we are used to. There will still be value in aggregating command decisions into a small number of elements of the anthill, but if those elements are disrupted, others will take over the job. This process will be as unconscious as you shifting your weight from one side to another to free up the muscles you need to pick something heavy up.
Our command and logistics will be far more brittle, but we have something they don't: electromagnetic devices. We can transmit information at nearly the speed of light with radios and cables and other similar devices. This means we have a tremendous logistic advantage in terms of information flow. Our soldiers will need to capitalize on this.
They may have radios also, depending on how advanced their society is. However, the mass high-bandwidth communication which makes a collective consciousness work would not be well supported by this medium. If you reduce them to radio, they are no longer one collective consciousness, but two, and they have less experience with that sort of situation than we do.
Okay, now lets use what we learned to combat these anthills. Our only real advantage is that we can transmit data far faster than they can. We can use this to develop a powerful tool to combat collective consciousness: the speed of darkness. If you can strike faster than information is transmitted, your opponent cannot prepare for it. The usual limit to this process is that the deeper you strike, the more cut off you are from your own general's orders. However, with the asymmetry of radio, you can strike faster than any of their intuitive high-bandwidth connections can respond to.
This gives you the ability to cut off a section of the anthill from the rest of its kind. At this point, it no longer has the brilliant tactical capabilities of the gestalt consciousness, it's much smaller. You can now wage a battle against the smaller piece. Repeat as necessary. The same logic works with the anthills themselves. Cut them off from the rest of the organism and take them on in isolation.
Along the way, you should be able to capture some of their dead ant bodies. You should be able to do research on them, and learn more about how they operate. This will be key knowledge about the enemy going forward.
The ideal goal would be to create a surgical strike that isolates a section of the anthill without raising any awareness. If you can move in subtly and quickly enough, you can interact with their information streams. This could be very powerful. As an example, it is obvious that once you strike, the larger side of the anthill is going to try to attack whatever forces you put in the way. It will have the goal of reattaching the lost group of ants to the greater whole. However, if you can strike swiftly and convince the segregated portion that the gestalt collective wants them to strike as fast as possible, and you can convince the gestalt that your segregated unit saw an opportunity and acted on it, then the enemy may not even realize that it is engaging in combat until it is too late.
Even if you can't interrupt their communications in such a subtle manner, you can let the weather do it for you. If you can predict the weather better than they can, you can predict how it is going to affect their communications. If you strike at the correct times and places, you can take advantage of mistakes in their weather prediction, so you know how they will respond better than they do.