Let $X$ be a proper algebraic smooth curve over a characteristic zero field $k$ and let $J$ be the Jacobian variety of $X$. Let $K$ be the function field of $X$. Assume that we are given $n$ distinct points $P_1$, ..., $P_n$ in $X(k)$ such that the image of the group of degree zero divisors supported on the $P_i$'s has finite image in $J(k)$. Let $\tilde{J}$ be the generalized Jacobian of $X$ with respect to the divisor $D:=P_1+...+P_n$.

Typically, I'm thinking about the case where $X$ is a modular curve, and the $P_i$'s are the cusps of $X$. But maybe my question has a general pure thought answer.

There is a rather non-standard description of $\tilde{J}(k)$, as follows (I found it in a paper of Yamazaki and Yang, Documenta Mathematica 21 (2016) 1669-1690, ``Rational torsion on the generalized Jacobian of a modular curve with cuspidal modulus''). Let $Y = X \backslash \{P_1, ..., P_n\}$, $\text{Div}(Y)$ be the set of $k$-rational divisors with support on $Y$. For each $i$ let $K_{P_i}$ be the completed local ring at $P_i$ and $U_{P_i}$ be the principal units of $K_{P_i}$. Let $\text{Div}(X,D) = \text{Div}(Y) \oplus \bigoplus_{i=1}^n K_{P_i}^{\times}/U_{P_i}$. There is a surjective map $\text{Div}(X,D) \rightarrow \text{Div}(X)$ induced by the inclusion $\text{Div}(Y) \hookrightarrow \text{Div}(X)$ and by the map $ K_{P_i}^{\times}/U_{P_i} \rightarrow \text{Div}(X)$ given by $f \mapsto \text{val}_{P_i}(f)\cdot (P_i)$. Let $\text{Div}^0(X,D)$ be the kernel of the composition $\text{Div}^0(X,D)\rightarrow \text{Div}(X) \rightarrow \mathbf{Z}$ where the last map is the degree. There is an obvious map $K^{\times} \rightarrow \text{Div}(X,D)$. Then we have a canonical isomorphism $\text{Div}^0(X,D)/K^{\times} \simeq \tilde{J}(k)$.

Suppose now that $k = \mathbf{C}$. There is an Abel-Jacobi style description of $\tilde{J}(k)$, given as $\text{Hom}_{\mathbf{C}}(\Omega^1(-D), \mathbf{C})/H_1(Y, \mathbf{Z})$ (think of $\text{Hom}_{\mathbf{C}}(\Omega^1(-D), \mathbf{C})$ as the whole space of modular forms, that is cusp forms $\textbf{and}$ Eisenstein series).

Question: how to relate explicitly the two descriptions that I gave of $\tilde{J}(k)$? More specifically I have the following question. Fix a uniformizer $t_i$ at each $P_i$. Let $m_1$, ..., $m_n$ be integers such that $\sum_{i=1}^n m_i=0$. Consider the point $M:=0 \bigoplus (t_i^{m_i})_{i=1}^n$ in $\tilde{J}(k)$ with the description above. The image of this point in $J(k)$ is $\sum_{i=1}^n m_i\cdot (P_i)$, which by assumption has finite order, denoted by $m$. The element $m\cdot M \in \text{Ker}(\tilde{J}(k) \rightarrow J(k))$ corresponds to a morphism $\varphi \in \text{Hom}_{\mathbf{C}}(\Omega^1(-D), \mathbf{C})$, well-defined modulo the periods $H_1(Y, \mathbf{Z})$. On the other hand, let $u \in K^{\times}$ be such that its poles and zeros are supported on the $P_i$'s (think of $u$ as a modular unit). Consider the element $\omega := d\log(u) \in \Omega^1(-D)$ (think of it as an Eisenstein series). Its periods along $H_1(Y, \mathbf{Z})$ are in $2\pi i \mathbf{Z}$. Therefore, the number $\varphi(\omega)$ is well-defined in $\mathbf{C}/2\pi i \mathbf{Z} \simeq \mathbf{C}^{\times}$. Is there a relation between $\varphi(\omega) \in \mathbf{C}^{\times}$ and the quantity $\prod_{i=1}^n \left((\frac{u}{t_i^{\text{ord}_{P_i}(u)}})(P_i)\right)^{m\cdot n_i} \in \mathbf{C}^{\times}$? Or at least is there a relation between the collection of the $\varphi(\omega)$'s and the collection of $\prod_{i=1}^n \left((\frac{u}{t_i^{\text{ord}_{P_i}(u)}})(P_i)\right)^{m\cdot n_i} \in \mathbf{C}^{\times}$'s when $u$ varies through a basis of ``modular units'' (such a basis has $n-1$ elements)?