From where is this thevenin equation derived?
Here's the equivalent circuit in the situation you're asking about







simulate this circuit &ndash; Schematic created using CircuitLab

"X" is whatever device is outside the device being studied. It could be a source, a resistor, or anything else. 

Regardless of what is connected to the port, if the input voltage is \$V_{in}\$, then you can see the voltage across the thevenin equivalent resistor is \$V_{in}-V_{th}\$, so the input current can be obtained from Ohm's law as

$$\frac{V_{in}-V_{th}}{R_{th}}.$$

Which, incidentally, means there is a sign error in the formula you presented.