Wow. I think your analogy about family being the heart and friends being the beat is really cute. Well it is hard to choose but if I have to, then I would pick family. What good is the beat if there is no heart right? At least if the heart has no beat you could use defibrilator, medications, or pacemaker or anything.
Family will always accept you and understand you more than friends can. Because your family has been with you since the day you were born.