Change out the head light connecter....
WD 40 and a toothbrush on the connections. If you have any computer board spray try it. If you have a very soft copper wire brush, you may try it or even a walnut pick or dentist scraper thingy to score the connections to remove the corrosion.
Search GMC Terrain Questions
GMC Terrain Experts