Mazda Repair Questions? Ask Mechanics for Answers ASAP
Are the headlamp the only light fluctuating , are the dash light steady?
In most cases this type of problem is caused by fluctuating voltage from the charging system and the time to check the charging system out put would be while the problem is occurring.
The best way to test the battery is by doing a load test and at the same time the charging system can be checked which includes the alternator. You are going to want to test this while the problem is occurring.