Preheat the oven to 400°. Lightly oil a rimmed baking sheet. In a medium skillet, heat 2 tablespoons olive oil over medium heat. Add the onion and cook, stirring until slightly softened, about 3 minutes.
In a large bowl, combine the ketchup, bread crumbs, eggs and pickles; mix in the onion. Crumble in the beef, add the cheese and mix together. Transfer to the prepared baking sheet and shape into a 4-by-12-inch loaf. Bake until an instant-read thermometer inserted into the center registers 160°, about 35 minutes.
Meanwhile, halve the potatoes and place them in a large pot with enough salted water to cover by an inch. Bring to a boil, then lower the heat and simmer until tender, 10 to 15 minutes. Drain, return to the pot and mash with the cream.
Let the meatloaf rest for 5 minutes before slicing. Serve with the mashed potatoes.