Building a Shunt active power filter in the synchronous reference frame
Well as usual, I'm answering my own question,

The block i was looking for is a LPF : Low Pass Filter.

The idea is that we have both the Harmonics and the fundamental together and we need to separate the two, so we push P (total power) through LPF tuned at the frequency of the grid (fundamental 50/60 Hz), it will let pass only the fundamental component Pf, than we subtract the total from the fundamental, it will leave us only with the harmonic component.