Pedal should not,IMHO, be depressed when the caliper is off. This is because the two pistons will not move in unison, one of those path of least resistance things. The result is one of the pistons may be pushed out of caliper. It appears that you have one very close to being 'out'.
I suggest that you open the bleeder to remove fluid resistance, and carefully try to pry the pistons back into the caliper. This will have to be done carefully and with even pressure on the piston so that you don't 'cock' it going into the bore. As you push on one, the other will try to come out of its bore. Need at least 3 hands, but 4 would be better.
I think the shim you are looking for can be found between the mounting ears of the caliper and the vertical link. If you had one, it should have fallen out when you removed the two mounting bolts. It's function is to center the caliper over the disc. Without it, the inside half of the caliper will (could) be closer to the disc than the outside half. As shims are added, the inside half will move, by the thickness of the shim, away from the disc and the outside half will move closer. Just add or subtract shims until the caliper is more or less centered, that is so that the disc is centered in the caliper slot.
Don't know if any of this is understandable but I hope it helps. Would be better if I could draw a picture, but alas.....