This is a third conditional sentence describing an unreal past situation. We use the past perfect 'had gone' in the if-clause and 'would have felt' in the result clause. This means he didn't actually go to the party, and as a result, he didn't feel better.