The two main results in this thesis have a common point: Hermitian--Yang--Mills (HYM) metrics. In the first result, we address a Dirichlet problem for the HYM equations in bundles of infinite rank over Riemann surfaces. The solvability has been known since the work of Donaldson \cite{Donaldson92} and Coifman--Semmes \cite{CoifmanSemmes93}, but only for bundles of finite rank. So the novelty of our first result is to show how to deal with infinite rank bundles. The key is an a priori estimate obtained from special feature of the HYM equation.
In the second result, we take on the topic of the so-called ``geometric quantization." This is a vast subject. In one of its instances the aim is to approximate the space of K\"ahler potentials by a sequence of finite dimensional spaces. The approximation of a point or a geodesic in the space of K\"ahler potentials is well-known, and it has many applications in K\"ahler geometry. Our second result concerns the approximation of a Wess--Zumino--Witten type equation in the space of K\"ahler potentials via HYM equations, and it is an extension of the point/geodesic approximation.