As difficult as it may be, you can come back as a stronger and more successful employee.
Being passed over for a promotion that you really wanted stings. Your first reaction may be to hit the job boards and start shooting your resume over to friends, hatching a plan to get out of there as soon as you can. But just because you suffered this (major) setback doesn’t mean you need to jump ship.