Let $(X, \mathcal X)$ be a measurable space. Let $\mu$ be a complex measure on $X$ and $|\mu|$ its variation. Then $|\mu|$ is a non-negative finite measure. By definition, $|\mu(B)| \le |\mu| (B)$ for all $B \in \mathcal X$, so $\mu \ll |\mu|$. By Radon-Nikodym for complex measures, there is a measurable $f:X \to \mathbb C$ such that $$ \mu (B) = \int_B f \mathrm d |\mu| \quad \forall B \in \mathcal X. $$
Now I would like the prove the polar decomposition of $\mu$, i.e.,
Theorem: $|f(x)|=1$ for $|\mu|$-a.e. $x \in X$.
Could you have a check on my attempt?
Proof: For $B \in \mathcal X$, let $\Pi(B)$ be the collection of all finite measurable partitions of $B$. For $B \in \mathcal X$, we have $$ \begin{align} |\mu| (B) &= \sup \bigg \{ \sum_{i=1}^m |\mu (B_i)| : (B_i)_{i=1}^m \in \Pi(B) \bigg\} \\ &= \sup \bigg \{ \sum_{i=1}^m \left | \int_{B_i} f \mathrm d |\mu| \right | : (B_i)_{i=1}^m \in \Pi(B) \bigg\} \\ &\le \sup \bigg \{ \sum_{i=1}^m \int_{B_i} |f| \mathrm d |\mu| : (B_i)_{i=1}^m \in \Pi(B) \bigg\} \\ &= \int_B |f| \mathrm d |\mu|. \end{align} $$
This implies $$ \int_B \mathrm d |\mu| \le \int_B |f| \mathrm d |\mu| \quad \forall B \in \mathcal X, $$ and thus $|f(x)| \ge 1$ for $|\mu|$-a.e. $x \in X$. For the reverse inequality, we need the following lemma, i.e.,
Lemma Let $(X, \mathcal F, \mu)$ be a $\sigma$-finite measure space and $(E, |\cdot|_E)$ a Banach space. Here we use the Bochner integral. Let $f \in L_1(X, \mu, E)$, $\mathcal A := \{A \in \mathcal F : \mu(A) \in (0, \infty)\}$, and $$ \varphi(A) := \frac{1}{\mu(A)} \int_A f \mathrm d \mu \quad \forall A \in \mathcal A. $$ Let $G$ be a non-empty closed subset of $\mathbb R$. If $|\varphi (A)|_E \in G$ for all $A \in \mathcal A$ then $|f(x)|_E \in G$ for almost all $x \in X$.
Notice that we have $|\mu(B)| \le |\mu| (B)$ and thus $$ \left | \frac{1}{|\mu| (B)}\int_B f \mathrm d |\mu| \right | \le 1 $$ for all $B \in \mathcal X$ such that $|\mu|(B) \neq 0$. By our Lemma, $|f(x)| \le 1$ for $|\mu|$-a.e. $x \in X$. This completes the proof.