Pain is one of the greatest teachers, and one of the greatest healers, too. I can't count the times I've been burned, or the ways I've been burned, but I survived the fire and came out stronger and a little bit wiser... and now that I've found real love, I cherish it far more than I would have in the past, because I appreciate how rare it is.
Sure, its scary putting yourself out there, because you don't know if you'll get burned again or if your love will be reciprocated. But if you don't take the chance, you will never know, will you? If you expect nothing, you'll get nothing.
Without the pain of rejection or a love gone wrong, you have no reference from which to truly cherish love gone right. But to believe your happiness depends on how another feels about you is to set yourself up to never find that happiness. Happiness must come from within. Finding someone to love, who loves you in return, is an enhancement to that happiness.
Its not really a gay issue... its a human issue. Everyone, to one degree or another, experiences this kind of thing... and if you'll ask around, you'll find that to be true.