Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thanks! I proved this fact in a strange way; I use base change to $\mathbb{C}$ by making use of embeddings $K\rightarrow \mathbb{C}$. Then $\sum d_{i}dm_{i}$ is actually the sum of zeros and poles of $f$ on $X\otimes_{\mathbb{C}}$. Since $f\in K(X)$ the sum must be zero. I never heard of the notation of "generic divisor". Thanks for the hint and the help.