1. Don't gossip. It's common to assume that anything shared with you is by default shared with your partner as well; however, your friend might be much less comfortable speaking to you in confidence if she thought the details of her personal life were going to be relayed to someone who used to share her toothbrush. (I'm going to use female pronouns for your friend, and male pronouns for your sweetie, for the sake of simplicity; however, every rule here applies no matter the genders of the participants.) Keep your friend's secrets. The reverse is also true; no matter how much you love discussing your dude with your besties, his ex can probably live without hearing the details of his current sex life. Save it for your diary or for anyone who didn't date him.
2. Don't trash talk. It's OK to come to your partner for advice if you're arguing with your friend, or vice versa, but absolutely resist the urge to belittle or insult one of them to the other. This can be extremely tempting if they ended on bad terms and you know you'll find a sympathetic ear. However, in order to maintain a healthy relationship with both of them, it's crucial that you never seem even a little like you're taking sides in their breakup or casting either one as the bad guy, even months or years after the fact. If you need to vent about one of them, find a neutral party.
3. Respect boundaries without making assumptions. For instance, if your friend doesn't want to go to parties where her ex will be in attendance, don't pressure her. But don't assume she doesn't want an invite if you haven't asked! In general, allow your friend and your sweetheart to decide how much contact they want with each other, and don't push them to associate if they're not into it. Remember that you can love them both without them necessarily having to enjoy each other. This goes for friends and partners who haven't dated, too, now that I think of it. Set aside time for each of them and honor it — don't drag your lover along on girls' night out (not even if your lover is a lady; queer chicks are so bad about this), and don't invite your friend to what was supposed to be a romantic dinner at home.
4. No comparisons. Don't ask your man if you're prettier/smarter/better at Scrabble than his last girlfriend. Don't do this ever, but especially not if his last girlfriend is the person you're going rock climbing with Sunday. No matter what his answer is, it's going to make things weird. Besides, comparing yourself to anybody — even if you come out ahead — is always going to lead to feeling crappy, because basing your self-esteem on where you stand relative to someone else is Not Healthy. So don't seek out comparisons, and if your dude brings up the topic, tell him you're not interested in hearing it. You and your friend are not in competition, except when you're actually playing Scrabble.