Let $X$ be a compact Riemann surface, $\omega$ a meromorphic differential on $X$ and $f$ a meromorphic function on $X$ with poles only over the points $P_1,\dots,P_d$. The product $\;f\cdot\omega\;$ is still a meromorphic differential, so by the residue theorem we know that $$ \sum_{P\in X} res_P(\omega) = \sum_{P\in X} res_P(\;f\cdot\omega) = 0. $$
My question is:
what can we say about $ \sum_{i=1}^{d} res_{P_i}(\;f\cdot\omega)$ ?
Is this sum also zero, or is it there any condition on $\omega$ that forces it to be zero?
$$\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ$$
$$ \heartsuit \quad \heartsuit \quad \heartsuit $$
$$\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ\circ$$
Remark (to make it more interesting)
If we think of $X$ as an algebraic curve over $\mathbb{C}$ and we set $D=P_1+\dots+ P_d$, we can consider the exact sequence $$ H^0(\mathcal{O}_X(D)) \to H^0(\mathcal{O}_X(D)\otimes \mathcal{O}_D)\to H^1(\mathcal{O}_X) $$ where the first map is the restriction map $\alpha$ and the second one is the coboundary $\delta$ coming from the Mittag-Leffler sequence of invertible sheaves $$ \mathcal{O}_X \to \mathcal{O}_X(D)\to \mathcal{O}_X(D)\otimes \mathcal{O}_D\;. $$
In this language the above meromorphic $f$ is an element of $\mathcal{O}_X(D)$ and, if $v\in H^0(\mathcal{O}_X(D)\otimes \mathcal{O}_D)$ is such that $\alpha(f)=v$, then we have $\delta v = 0$.
One can define a perfect pairing $$ \langle \bullet, \bullet \rangle : H^1(\mathcal{O}_X) \otimes H^0(K) \to \mathbb{C} $$ by setting $$ \langle \delta v, \omega \rangle := \sum_{P\in D} res_P (\omega\cdot v_P). $$
My question arises from the fact that I would expect $\delta v = 0$ to imply that $\langle \delta v, \omega \rangle = 0$ for every differential $\omega$.
Assume the genus of $X$ is at least $1$ and let $\omega\in H^0(K)$ be a holomorphic abelian differential on $X$.
Further, assume $v\in H^0(\mathcal{O}_X(D)\otimes \mathcal{O}_D)$ belongs to the image of $\alpha$, so that there is a meromorphic function $f\in H^0(D)$ with poles allowed on $D$ for which $\alpha(f)=v$. We have $$ \begin{align} \langle \delta v, \omega \rangle &= \sum_{P\in D}Res_P\;(v_P\cdot \omega) \\\\ &= \sum_{P\in D}Res_P\;(\,f\cdot \omega) \\\\ &= \sum_{P\in D}Res_P\;(\,f\cdot \omega) + \sum_{P\not\in D}Res_P\;(\,f\cdot \omega)\\\\ &= \sum_{P\in X}Res_P\;(\,f\cdot \omega) \\\\ &= 0 \end{align} $$
where we used the fact that $\sum_{P\not\in D}Res_P\;(\,f\cdot \omega)= 0$, since $f$ is holomorphic outside $D$ ad $\omega$ is holomorphic everywhere. The last equality is due to the residue theorem.
Hence the answer to my question is:
Yes, given a meromorphic $f$ with poles on $D$ we have $\sum_{P\in D}Res_P\;(\,f\cdot \omega)=0$ if we require $\omega$ to be holomorphic, at least outside of $D$.