There wasn't one continuous buildup-- he was going to get his revenge (whatever it was) much earlier, but then his progress got reverted and he considered killing himself as part of a new revenge plan. Then, when he was persuaded from killing himself, he let this girl attempt to help him for several chapters while it was clear he was being slowly won over by her efforts, before he reverted himself and decided to deceive someone that-- at this point-- was not only not bullying him, but was sacrificing himself to his bullies for him.
And even then, this wasn't something he concocted-- it was just an opportunity he took that randomly presented itself.