The battery light is probably flickering due to the drop in engine speed. But it would still be worth making sure the connections to the battery are clean and tight.
Do you have access to a scan tool so you can monitor sensors like the Engine Coolant Temperature (ECT) sensor and the Intake Air Temperature (IAT) sensors, along with the MAF sensor? It sounds like maybe once the engine gets up to temperature some sensor reading may be so far off it's really screwing up the air/fuel ratio. At the time it starts running poorly does the exhaust have a dark color or smell like raw fuel?
-Rod