How do I overcome the pain of being passed over?
Not easy. Best thing to do IMO is just to focus on your current tasks and do the best you can with them.
Hopefully, you don't hate your work, and find some gratification from it. Focus on that, and put the past behind you. Everyone wants to be promoted, but there are only so many spots available. It wasn't your turn yet - that's business; that's Life. If you are fit, your time will come.
It's also important to realize that not getting promoted doesn't necessarily mean your employers are dissatisfied with you, or that your work is somehow deficient. Many factors are involved in such decisions: "Office politics", personalities, etc, are very important regarding who gets moved up, and when. Maybe they just didn't like color of your tie that day! (Yes, those things happen...) From a distance, it's very hard to say, so don't feel so bad about it.
Another thing you might consider is approaching those who mentioned that you were apparently in line for the promotion, and asking them, very tactfully and delicately, "What happened?". You need to proceed with great care if you choose to explore this path: You could be viewed as arrogant, jealous or overly ambitious by your superiors for questioning them in such manner, thereby setting yourself back even further. You have to know the "playing field" well - have a very good grasp of your relationship with your superiors, and your standing in the firm - to undertake such a discussion.
where should I go from here?
You'd need to tell us a good deal more about your present situation to expect a good answer on that. For example: If you're 25 and have been on the job for two years, the answer will be entirely different than if you're 40 and have been on the job for ten years.