Calculating thermodynamic properties from perturbation theory II. An analytic representation for the square-well chain fluid