Preheat the oven to 375°F and lightly grease a loaf pan.
In a large bowl combine the ground beef, breadcrumbs, egg, onion, 2 cloves minced garlic, 1/4 cup milk, 2 tablespoons of the ketchup, and a pinch each of salt and pepper. Mix just until the ingredients are evenly distributed.
Transfer the mixture to the prepared loaf pan and shape it into an even loaf. Spread the remaining ketchup over the top.
Bake for 50 to 55 minutes until the internal temperature reaches 160°F. Let the meatloaf rest for 5 minutes before slicing.
While the meatloaf bakes, place the potatoes and 3 whole garlic cloves in a large pot and cover with cold water. Add a generous pinch of salt and bring to a boil. Cook until the potatoes are fork-tender, about 15 minutes.
Drain the potatoes and garlic. Return them to the pot, add the butter and 1/2 cup milk, and mash until smooth. Season with salt and pepper to taste.