A relationship between Poincaré-type inequalities and representation formulas in spaces of homogeneous type