The election of 1519 is the best example, as it was disputed between King Francis I of France and Charles, King of Spain and Archduke of Austria.
By "dispute" we mean "who has deeper bribing pockets", although Charles had one vote guaranteed by family ties. (yes, the same Charles who inherited Spain; Burgundy; Austria, Low Countries and other Hapsburg lands, Milan, and etc. and become Emperor Charles V). It also appears that some famous banker families got very busy and happy with all this royal spending.
Just imagine if Francis were Emperor. No more HRE+Spain vs France wars? No France-Turk alliance? What if he managed to keep HRE and France united in the next generations? But this is alternate history.
Also, Alfonso X of Castile disputed an election to King of Romans with Richard of Cornwall - both coming from outside the empire in the XIII c. Neither of them was crowned Emperor. Their history is complicated and I have never understood it fully - it looks like the electors wanted money. Some Iberian sources call him Emperor Alfonso X, although it looks like to be wishful thinking.
Not sure if you want to count Sigismund, as his family is obviously from the Empire, and he ruled Brandenburg for some time, but when he was elected he was primarily King of Hungary - outside the empire, as his succession to Bohemia was disputed. If you like computer games, the dispute Sigismund-Wenceslaus-Jobst is featured in the Kingdom Come Deliverance game.
I think EU4 got it right: in the game it is possible but much harder to elect a candidate from outside the empire.