How to compute loss

Hello everyone! How to compute this loss (I’m able to sample some x from P)?
изображение