All my pains went for nothing.
仇になる seems to mean “to backfire” or “to have a harmful result”. So it goes beyond “went for nothing”.
“Even with all the troubles I went through, it went wrong”
I am not sure how せっかく fits in there though… Maybe “even with the special care I took, it went wrong” is the meaning after all?
All my pains went for nothing. should be:
水の泡 is pretty much the same as a “bubble burst” situation. The last two sentences sounds formal.
Rather, all my efforts just spoiled him/her.
“Spoiled” here doesn’t mean “to go to zero” but “to go to sub-zero” (negative). For example, I was a dedicated Japanese language tutor for Tom. Tom improved his Japanese skills, and he misused his skills to orchestrate a scam in Japan.
せっかく here means “in spite of difficulties” or “I squeezed my precious time to dedicate myself to X”.