Just because the mentorship didn't work out doesn't mean your mentor is "bad" or can't improve. Give honest feedback, so that your mentor can be better in the future. Mention the advice that helped you the most, and diplomatically suggest areas where the mentor could have been more helpful. For example, if your mentor only gave negative criticism, you could say, "I know that novice questions must be irritating to someone so advanced in our field. Maybe you could come up with a list of commonly asked beginner questions and answers for your next mentee so you don't have to keep answering the same things over and over."
Dealing with hurt feelings
Mentors are only human, and some will have hurt feelings when a mentorship ends unexpectedly. While you want to be as polite and respectful as possible, remember that you can't take responsibility for another person's feelings. Your mentor may feel embarrassed or angry when you end things, which is why you want to give him or her advance notice of the end date. That way, he or she isn't put on the spot and will have time to process emotions before the last meeting.
On the flip side, your mentor may also feel that the relationship has run its course and didn't know how to break things off first with you. In this case, he or she may feel a sense of relief.
Some mentor relationships will transition to professional or personal friendships, while others will not. If you'd like to stay in touch with your mentor, tell him or her that you'd enjoy meeting up every once in a while for lunch or dinner. If you don't want to see him or her out of the professional setting, then simply thank him or her and say that you're grateful for all the help. End the conversation by briefly summarizing the successes of the mentorship and thanking your mentor one last time.
Learning from the experience
Even if your first mentorship didn't go as planned or you had to end things prematurely, it doesn't mean that the relationship was not worthwhile or that you won't have a successful mentorship in the future. Take some time to reflect on what you gained from the mentorship -- even if the only thing you learned is what not to look for in a future mentor. In general, mentorships should last between nine and 18 months, so remember to set a target date when starting a new mentorship. You can also agree on how you will end things and plan an exit strategy ahead of time. When the conversation occurs at the beginning of the relationship, it makes for a smooth and successful transition when it's time to move on.