Approximation of integral type functional of Markov processes