Numerical approximation of the solution in infinite dimensional global optimization using a representation formula