The former would be preferable, I would think. The latter might only result in deflection and potential survival. Of course, if only your legs gets run over and mangled, you could survive, also. I think jumping in front of a train is a difficult way to ctb, and is certainly not a peaceful way to die. It's a violent way, actually. Not my method, although I can understand others considering it, who may not have other means at their disposal.
I've thought about it a lot because of the frequency of freight trains I see here, we also have a train station. The regular trains here claim to reach over 100 miles per hour depending on the route. Freight trains are noticeably slower, but I don't have any numbers for it. Doing it at a station made me uncomfortable because the train slows down, and there's lots of strangers watching who could intervene. Head-on impact personally made me uncomfortable; I preferred crushing my head or decapitating myself for extra assurance. There's not enough space underneath the front of a train here to really get your head under there though, so i'd have to aim from the side and like? Time it right or something. Not very assuring, I know. Making someone kill me was the ultimate dealbreaker for me. I don't like wrapping people up in my business. The train driver would have to meet my family and stuff and I don't like that.