I think that you have understood the analogy correctly, and you have pinpointed one of its weaknesses. Although number fields are like one dimensional functional fields in many ways, one of the differences is that the vector space of Kahler differentials for a number field is has dimension 0, not 1. Here Kahler differentials are the vector space generated by symbols dx, subject to the relations d(x+y) = dx + dy and d(xy) = x dy + y dx.
Therefore, there is nothing like differentials, and nothing we can integrate.
But it is possible that there is some more sophisticated way to solve this problem. (Maybe using Arakelov geometry?) I'm looking forward to reading the other answers.

