Preheat the grill to high. Form the meat into 4 (1/4-inch-thick) burgers. Season the meat with salt and pepper on both sides. Grill for 2 to 3 minutes on both sides for medium doneness. When the burgers are done, remove from the heat and reduce heat to medium-low.
Meanwhile, combine the mayonnaise and roasted garlic in a small bowl and season with salt and pepper to taste. Spread both sides of each bun with mayonnaise and mustard. Place a slice of cheese on the bottom portion of each bun, place the burger on top of the cheese, then top the cheese with a slice of ham and another slice of cheese and, finally, the pickle slices. Place the tops of the buns over the pickles, wrap the burgers in aluminum foil and place them on the grill. Using a heavy pan or a brick-wrapped in foil, press down on the burgers for about 30 seconds to 1 minute. Lower the lid on the grill and continue grilling for 1 to 2 minutes, or until the cheese has melted and the bun has become pressed and firm.