I am trying to understand how the voltage drop across a resistor comes about in a DC circuit. I have no concerns over the relation described by Ohm's law: the current through a resistor will be proportional to the potential difference applied to it. However, I am confused about how the voltage drop across a resistor takes effect in the context of it being placed in a circuit, as I have not been able to find a derivation of this result that both conceptually and mathematically makes sense.
I have read about a derivation that uses Ohm's law to equate the work done on a charge carrier by the battery and the thermal energy that is lost by that charge carrier in going through a resistance. However, after this derivation I am still confused about the potential difference that is set up on the resistance. The reason for my confusion is because I don't understand how thermal energy and potential energy can be equated to each other.
I have read about surface charges, and it makes sense to me for the potential difference to be due to surface charges, yet I haven't a found a direct derivation of the potential difference from the surface charges.
Edit: Here is my derivation. I have doubts about it. Namely, I don't see how this derivation delineates how this potential difference forms.
Derivation based on the idealized DC circuit described by Ohm's law:
The electric field is constant across the wires, which are assumed to have a resistivity = 0.
The electric field is also constant across the resistor since if it weren't there would be charge buildup within the resistor. The electric field within the resistor also needs to be greater than that within the wires for there to be no charge buildup.
For the wires we have: E1 = ρ1A1/I . The current isn't zero, so the electric field must be zero. (Again, this is a highly idealized circuit).
For the resistor: E2= p2A2/I.
But, since the electric field is constant across both of these wires, there is also the relation E = V/L.
For the wires we find that the potential difference is 0 from the terminal of the battery up to the resistor. So the terminals of the resistor need to be at the potential of the battery.