Head to Head is always best OVERALL record (actually it is winning percentage). Division Record only comes into play when breaking ties within the division (Head to head record doesn't matter at all). If teams are tied and in different division, then total points are used to break the tie.
I have two teams within a division with identical overall score. The team in front has a worse in-division record by a game, but has higher points-for.
Team X in 3rd overall at 7-4, with a 6-3 division record and 1144 points.
Team Y in 5th overall at 7-4, with a 7-3 division record and 994 points.
The one team above both of them is 7-4 / 7-3 / 1064.
How is X ahead of Y? He should be ahead of both or behind both, right? He has the most points, but the two have better divisional records.