I've been there buddy, and here's what I say.
I have to give you two possible concepts here. One is if you want the girl back, and the other is if you don't.
If you don't want the girl back, then you should let your friend date her if that's what he/she wants. Can you imagine someone told you that you couldn't date her when you first got together? You would have never known the last 3 years, and that's definitely not fair, for her or for your friend. Hopefully the friend discusses this whole deal with you first and is cool about it.
The other possibility is that you still want her back. If that's the case, the first thing you have to figure out is why you want her back. Do you want her back because someone else is showing interest, because you can't have her, or because she's worth it. You have to truly think hard on this one, because by lying to yourself, you're only going to hurt yourself. If you want her back for the right reasons, then by all means fight for her with everything you have. If you want her back for any other reason besides the right one, than I think it would be selfish of you to stand in the way of her getting together with anyone, let alone someone you consider a friend and also want to see happy.
When I broke up with my girlfriend of 6 years a couple of months ago, I used to say that I just want to see her happy. Truthfully, it took me two months to actually mean it. We are now both back in the dating scene, and I truly am happy for her when she meets a nice guy which she recently has. It's not always easy, but if you ever loved her, you will find it in your heart to want only good things for her. She's not so happy when I date, but that's another story for another time.
Well, hope I was somewhat helpful.
P-Funk