A decomposition technique for integrable functions and some applications