と思うと
Meanings
1
no sooner than; as soon as; immediately after
Used after the past tense of a verb to express that one action happens right after another, often with a sense of surprise or unexpectedness. The second clause is typically in the past tense.
No sooner had he arrived home than he went out again.
The rain had just stopped when it started again.
2
at the thought of; when I think about
Expresses an emotional reaction or realization that occurs upon thinking about something. Often used with verbs like 泣ける, 腹が立つ, 悲しくなる, etc. The preceding clause is usually in dictionary form or た-form.
Even now, I cry when I think that I can never return to that day.
When I think that he is that irresponsible, I get angry.