There was a scene from season 4, episode 12 directly after Walt sends his family away. It's towards the start of the ep.
Walt is sitting in his back yard by the pool, spinning his gun. Twice it points to him. I took that as God/fate/karma/whatever telling him to kill himself. Since all this evil is directly tied to him.
The third time he spins the gun look at what it points at....
[ame]http://www.youtube.com/watch?v=_rzjS4hzR8E[/ame]
That's where he gets the idea to poison the kid. And yeah, he did it to turn Jesse against Gus. Also, Jesse was right. Saul and his goon helped Walt. Rewatch this scene from the same ep, when Saul's goon frisks Jesse:
You can see him put something in his pocket at the last second. That was the old pack of cigarettes with the ricin.