The boxed version is actually a Steam version so if you buy your digital version on Steam - then they are the same. So yes they are compatible.

I have not tested it but I am 99% certain that the save games are compatible even if you buy the GOG version digitally.

Note that the collectors box contain Source Hunter DLC. I think you need that before starting a new game since it gives a few (not very interesting) items to your inventory for new games.