Factorization Lemma for Extended Real-Valued Functions