The correct phrase is "a friend of mine."
When you want to indicate that someone is your friend, you use the possessive pronoun "mine" instead of "me." The possessive pronoun shows that the friend belongs to you.
Correct: "This is a friend of mine."
Incorrect: "This is a friend of me."
So, always use "a friend of mine" when referring to someone who is your friend.