you start training yourself not to care about something after you first get your heart broken (at least i did). you made a wager and lost, so you learn that the only way to avoid losing is to avoid playing. i don't think it's possible to have complete control over what you invest your emotions in though. it's one of those asymptotic things where you can get closer and closer to not caring, with practice, but ultimately you can't eviscerate unconscious desire.
would it be a good idea anyway? is sustained mediocrity and numbness preferable to occasional bouts of pleasure or suffering? those "bouts" aren't even random. it's like playing the stock market, you don't just bet on red or black and hope to luck out -- you mitigate your chances of losing by making educated choices.
i.e. you learn at what point it is acceptable to trust someone, or what being a fan of some sports team may cost you (i broke up with the saints many years ago -- the team with "can't win, don't try" as its motto).
caring (or choosing when and when not to care) is probably one of those inherent aspects of humanity that isn't meant to be completely under our control. if you thought about why you were in love with someone wouldn't any answer you give only be a partial one? there's an intangibility to it that can't be consciously recognized, much less controlled.
also, the fact that you have to TRY not to care arbitrarily means that you do, which really annoys me.
you can tie everything back to a biological need to survive if you think about it enough.