I'm sorry to hear about your situation and your struggles. As someone else who suffers with chronic pain (from many accidents, injuries and 15 surgeries), both musculoskeletal and full body nerve pain, I understand why you feel that way, even though I'll never truly know how you feel personally.
I've had chronic pain for 9 years this year (sometimes it's been so bad that I've felt like I've been hit by a bus and set on fire at the same time), and I've wanted to jump in front of a train many times because of it, well that and because of my other circumstances.
Why haven't I? Because of the trauma it would cause to other people, so I completely agree with what everyone before me has said. To traumatise the train driver, as well as those picking up the pieces etc, is absolutely unacceptable in my opinion, and I would not do such a thing.
However, that method would guarantee an instantaneous death for me, given the fact that the trains pass through the location at 125mph. To my knowledge, no one could survive something like that, and even so, i would still not do it. But, with walking into the freeway, there's a possibility that you'll survive and make things A LOT worse for yourself.
Plus, as @Dontwant2Bhere said, it could result in somebody else taking their own life because of the trauma that YOU cause to them, and that would be an absolute tragedy. Then think of the knock on effect of such an event, you could literally destroy an entire family's lives (including children). Then there's the likelihood of killing the people in the vehicle that hits you, either immediately, or due to the injuries they sustain in the accident. In fact, it won't actually be an 'accident' will it, because you'll have caused it purposely, not good.
Please DO NOT do what you said, and think about other people. I know that you are hurting very badly, I get that, most of us on here are, but please do not cause any harm or hurt to others. Sorry for going into all that detail, but I just want you, and anybody else considering something similar (a method which will traumatise, or worse, result in the death of others) to understand the potential consequences or such actions.