In order to express that something cannot be helped or cannot be resisted in Japanese, the phrase
ないではいられない will be used. This is a structure that is comprised of verbs in the negative form connected to で, は, and the negative-potential form of the る-Verb 居(い)る 'to be'. In this way it just means 'to be unable to be without (A)'.
ないではいられない primarily expresses the inability of the speaker to tolerate (A) not happening, due to wanting to do it. It may also indicate that they will unfortunately do it despite knowing that they shouldn't.
セール品(ひん)を見(み)ると、買(か)わないではいられなくなる。
When I see something on sale, I can't help but buy it.
私(わたし)は辛(つら)い物(もの)を食(た)べると、牛乳(ぎゅうにゅう)を飲(の)まないではいられないの。
When I eat something spicy, I can't help but to drink milk.
ペットのワンちゃんが自分(じぶん)の尻尾(しっぽ)を追(お)いかけているのを見(み)るとおかしくて、笑(わら)わないではいられない。
When I see my pet dog chasing his tail around,it is so funny that I can't help but laugh.
ないではいられない may also be used to highlight that in the situation of (A), some particular emotion, feeling, or reaction cannot be repressed. (B) is something that happens naturally as a consequence of (A).
大親友(だいしんゆう)がじこでなくなったときは、泣(な)かないではいられなかった。
When my best friend died, I couldn't help but cry. (Emotion)
おばあさんが困(こま)っているのを見(み)ると助(たす)けないではいられない。
When I see an old lady in need, I can't help but help them. (Feeling)
上司(じょうし)に理不尽(りふじん)に怒(おこ)られた時(とき)には、キレないではいられなかった。
When my boss yelled at me unreasonably, I couldn't help but lose my temper. (Reaction)