I would suggest reading, “Gunfight: The Battle Over the Right to Bear Arms in America” by Adam Winkler (ISBN 0393345831). The author has extensive end notes so you can check his sources. (There are also a number of books out there about the use of arms in the struggle for civil rights, but that’s not directly relevant.)
This is greatly condensed. First, under English common law at the time, it was understood that the right to own arms for self defense was an individual right. The English king had previously disarmed groups (Catholics, I think? I’m not sure off the top of me head), and though it had taken a while, English courts had ruled that it was not legal for the gov’t to seize arms from the people. In the Americas, people were just armed. Most people had guns (certain anti-gun researchers have falsely claimed otherwise, but their claims simply don’t stand up), although “people” here is defined as white, male landowners, since women didn’t really have rights, and black people were largely enslaved. The militias of the time were *ALL able-bodied men. The people were legally obligated to provide their own weapons–which meant weapons fit for military service–and to both practice on their own, and muster with the rest of the militia when they were called to do so. The colonists were largely in charge of defending themselves, because it was expensive and slow to send the British army and navy over when colonists had skirmishes with the French or Native Americans. (I’m not making a values judgement on the colonists being colonizers and taking Native American land; just saying that’s the context.) The first real battle of the American Revolution occurred at a period when England was trying to exert more control over the colonies, and decided to seize the weapons that the the colonists had been amassing. The Battle of Lexington and Concord was specifically that; an attempt to seize weapons from the militias.
The people that wrote the constitution intended for the people to be armed, and for the people to be armed with military weapons. Self defense was clearly a consideration, but it wasn’t the only consideration. When you read the things that the leaders of the revolution and authors of the constitution wrote regarding arms, it’s clear that they never intended it to be a right of the government; after all, the constitution gave the government the right to raise an army, so why would you need to have an amendment that also gives the gov’t the right to have arms?
In regards to the violence - I’d argue that guns are not the problem, but are only tools. Switzerland and Finland both have heavily armed populations, but have very, very low murder rates, and very low rates of violent crime in general. The US combines a large number of guns with uniquely bad social and economic conditions; if we effectively address the social and economic conditions, then the issues with violent crime will largely disappear on their own, without the removing the civil rights.