a. The first time, / b. At first, / c. For the first time, … when I came to Japan, I was lonely.
The best answer is ‘b.’, because this phrase means something experienced in an initial instance–the conditions around which continued for a time; or it means something was done that was not done before, and it was done additional times after.
‘C’ means something was done and/or experienced causing certain feelings and results, but that those feelings and/results changed thereafter–and that this difference will be explained shortly.
‘A’, though not wrong, represents a kind of phrase–because of the comma and the use of ‘when’ after it–that presents an unnatural (or non-fluid break in the ) flow of the sentence, specific to spoken English, which requires context and intonation to be fully understood without confusion; and this phrase is adverbial, however is followed by an adverb. Placing them side by side is a possible challenge to the non-contextual expression of this construction (say in written English)–unless understood as dialog, with quotation marks. So this (while often done) is not the best answer for a grammatically and style-correct version of the idea being expressed. Basically, it is only acceptable in spoken English or idiomatic/dialect–in dialog.
*Proximity means distance between or from.