Threatening about filing for divorce or otherwise ending the relationship is a big "no no" in the dating game. At least not if you truly intend to keep your partner more than a few weeks by your side. This way of threatening shows that you're not truly committed to the relationship, making your partner feel rejected and preventing him or her from feeling relaxed and safe in their romantic dealings with you.
But once you've said or done something that may indicate that you think about leaving the relationship, even if it's an idle threat, the damage has been already done. And eventually, this action will take its toll on your lover, leading to a point where your partner may actually start considering ending the relationship and start to look for other people to date. So be smart and stay away from such topics of discussion.