Wikipedia gives two formal definitions of the electromotive force:
One in case of a closed loop, in which case the the EMF is supposed to be the path integral of the electric field (and all other forces effectively acting on charge carries) along that loop.
The other one in case of a device with isolated terminals, in which case the EMF is supposed to be the negative difference of the electrostatic potential (coulomb potential) created by the charges at the terminals.
None of these definitions deals with devices (like a resistor, or a capacitor, for example) that are part of an electric circuit. Is there a definition that deals with an arbitrary devices inside an electric circuit (for example a resistor in an electric circuit which is neither short circuited, nor isolated)?
My proposition as a general formula to calculate the EMF along an electric device is to choose a path connecting the two terminals of the device along conductors inside the device, and then integrating along that path all forces that act on force carriers (all electric fields, conservative or rotational, lorentz-force, and effective chemical and thermal forces). Would that formula generalize the two definitions given at wikipedia?