The Voltage regulator behind the dash is for the gauges and warning lights
It is called a Instrument cluster Voltage regular and has NOTHING to do with flickering lights
Your problems can be caused by a few things
1) Bad grounding of all associated parts
2) bad headlight switch
3) corroded connections
4) Bad Voltage Regulator