Is it just that circuit affected?
Best thing to do, is going from your headlamp, follow the wiring back through any connectors, make sure they're clean and tight and dry. Also check wiring for damage (chafing etc), esp wiring routed near engine (it gets exposed to temperature fluctuations). There is a relay in that circuit - don't forget to check it (and its connector).