General Motors, four years after being kicked off the Standard & Poor’s 500, will heal another wound when it rejoins the benchmark gauge Thursday. The largest US automaker is replacing H.J. Heinz, which is being bought by Berkshire Hathaway and 3G Capital for $23 billion. GM had been on the index since 1957 until its 2009 bankruptcy and US bailout. ‘‘They’re in essence getting a vote of confidence from S&P,’’ said Daniel Genter, of RNC Genter Capital Management.