Watching movies such as The Patriot and reading about military campaigns such as the Peninsular War, if a standard infantry unit that normally fights in an organized line is engaged with irregulars or a militia that is using cover and spaced out, what were the official tactics when responding?
Generally speaking the fight as you probably envision it wouldn't happen except in particularly rare circumstances. The strength of guerrillas is generally on a more strategic level of implementation. You would implement guerrillas in places where the strength of their speed, difficulty to engage in conventional combat, and obscured numbers will give them a strength to achieve a local, strategic advantage, usually for the purpose of harming the enemy's ability to fight conventionally at full strength later.
So the common myth that's often thought up is the British showing up onto a battlefield astride large horses, backed by slow, lumbering cannons, and dressed in beautiful colors, all in rows, looking around expecting their enemies to show up. Instead they are only met by volley fire from hundreds of bushes or trees and the regular soldiers try to fire back, can't see, and are ultimately forced to run away.
This is basically a myth about how they were used. If regular infantry, prepared for battle, encountered guerrillas they would simply do as they always do, which was the convention of the era: form up, march forward, lay down fire, and overwhelm the guerrillas with tremendous, overwhelming firepower and discipline.
The guerrillas would lack the ability to deliver a coordinated response to volley fire in the idea that we think of them, because even their most accurate weapons are still too inaccurate for sustained combat, and most important they would lack any kind of artillery to punch through the formations of the enemy.
They may get a few kills in, but before long they would cede the ground.
If guerrillas, irregular militia and the like were to engage regular infantry it was where their assymmetrical preplanning would give them an advantage. They would wait on roads, where supply trains might become separated from the main force and could be overrun, messengers can be picked off and their dispatches intercepted.
The strength of irregulars and guerrilla warfare relies on attacking a superior enemy when they are not in a position to fight back. Small clusters of men mobbing small clusters of men from surprise positions, lighting of fires on wagon trains, things of that nature.
There were very few situations where the presence of guerrillas in a traditional battle were of substantial value, because they were so inherently weak to a direct, head on confrontation. Their primary purpose is to disrupt the regular flow of an army off the battlefield rather than having a significant role on the battlefield itself.