ABRIDGED-This paper presents the first direct estimate of the 3D clustering properties of far-infrared sources up to z~3. This has been possible thanks to the Pacs Evolutionary Probe (PEP) survey of the GOODS South field performed with the PACS instrument onboard the Herschel Satellite. An analysis of the two-point correlation function over the whole redshift range spanned by the data reports for the correlation length, r_0~6.3 Mpc and r_0~6.7 Mpc, respectively at 100um and 160um, corresponding to dark matter halo masses M>~10^{12.4} M_sun. Objects at z~2 instead seem to be more strongly clustered, with r_0~19 Mpc and r_0~17 Mpc in the two considered PACS channels. This dramatic increase of the correlation length between z~1 and z~2 is connected with the presence of a wide, M>~10^{14} M_sun, filamentary structure which includes more than 50% of the sources detected at z~2. An investigation of the properties of such sources indicates the possibility for boosted star-forming activity in those which reside within the overdense environment with respect of more isolated galaxies found in the same redshift range. Lastly, we also present our results on the evolution of the relationship between luminous and dark matter in star-forming galaxies between z~1 and z~2. We find that the increase of (average) stellar mass in galaxies <M*> between z~1 and z~2 is about a factor 10 lower than that of the dark matter haloes hosting such objects (<M*>[z~1]/<M*>[z~2] ~ 0.4 vs M_{halo}[z~1]/M_{halo}[z~2] ~ 0.04). Our findings agree with the evolutionary picture of downsizing whereby massive galaxies at z~2 were more actively forming stars than their z~1 counterparts, while at the same time contained a lower fraction of their mass in the form of luminous matter.