Motivated by the infinite horizon discounted problem, we study the convergence of solutions of the Hamilton Jacobi equation when the discount vanishes. If the Aubry set consists in a
finite number of hyperbolic critical points, we give an explicit expression for the limit.