the obvious solution--
to prevent anything like this to happen again--
is to go back to nature's way of multiple mating--
why be so committed to one person (especially at the 'girlfriend' stage) to the point that their rejection causes 'you' to feel so depressed?
one should have several 'friends' of the opposite sex--
(yes, a bit of tongue in cheek-but some serious consideration as well)