We present a method to calculate the x-space expressions of massless or massive operator matrix elements in QCD and QED containing local composite operator insertions, depending on the discrete Mellin index N, directly, without computing the Mellin-space expressions in explicit form analytically. Here N belongs either to the even or odd positive integers. The method is based on the resummation of the operators into effective propagators and relies on an analytic continuation between two continuous variables. We apply it to iterated integrals as well as to the more general case of iterated non-iterative integrals, generalizing the former ones. The x-space expressions are needed to derive the small-x behaviour of the respective quantities, which usually cannot be accessed in N-space. We illustrate the method for different (iterated) alphabets, including non-iterative 2F1 and elliptic structures, as examples. These structures occur in different massless and massive three-loop calculations. Likewise the method applies even to the analytic closed form solutions of more general cases of differential equations which do not factorize into first-order factors.