I would start by painting the edges the same color as the background and then evaluate the result. Adjust the paint later, if necessary.
Mark
Elmer.
The above is my opinion, from an active and experienced Model Railroader in N scale and HO since 1961.
(Modeling Freelance, Eastern US, HO scale, in 1962, with NCE DCC for locomotive control and a stand alone LocoNet for block detection and signals.) http://waynes-trains.com/ at home, and N scale at the Club.
There are several possible approaches to this application, in my experience.
The first, as already suggested, is to paint the sides of the foamcore the same hue as the backdrop. This would be the best approach if one were to attach the cutouts directly to the backdrop itself. It allows the structure to stand out against the background, while at the same time giving the impression of its being a considerable distance from the viewer.
If, as you suggest, you wish the cutouts to free-stand about 1/2" infront of the backdrop, I would paint the sides of the foamcore to generally match the color of the building, providing more of a three dimensional appearance.
However...my choice in such an application would be the first method - attaching the foamcore-mounted cutouts directly to the backdrop. Even 1/2" gap infront of the backdrop tends to create a rather awkward impression, allowing the viewer to see partially around the structure as they alter their position infront of the layout. It also results in a distinct shadow of the cutout falling on the backdrop, immediately killing the impression of realism. The only way to minimize this problem is to apply additional structure images flat to the backdrop itself (not using any foamcore) to give the impression that the free-standing ones are decidedly closer to the viewer, rather than at a great distance.
CNJ831