How can I find closed form of the following $E[X]=\sum^n_{i=1}iP(X=i)$
This is a problem of calculating the number of front-facing coins. $P_m$ is front-facing probability of a coin $m$. Each coin has different $P_m$.
Let $X$ the amount of front-facing coins. $n$ is the total number of coins.
\begin{align*} P(X=1) &=P_1(1−P_2)\ldots(1−P_n) + (1−P_1)P_2(1−P_3)\ldots(1−P_n)+\cdots \\ &\quad+(1−P_1)\ldots(1−P_{n−1})P_n, \\ P(X=2)&=P_1P_2\ldots(1−P_n)+(1−P_1)P_2P_3\ldots(1−P_n)+\cdots\\ &\quad+(1−P_1)\ldots P_{n−1}P_n, \\ &\qquad\vdots\\ P(X=n−1)&=(1−P_1)P_2\ldots P_n+P_1(1−P_2)P_3\ldots P_n+\cdots \\ &\quad +P_1\ldots(1−P_{n−1})P_n+P_1\ldots P_{n−1}(1−P_n), \\ P(X=n)&=P_1P_2\ldots P_n. \end{align*}
You are over-complicating the question. For each $m \in \{1,\cdots,n\}$, let $X_m$ denote the RV given by
$$ X_m = \begin{cases} 1, & \text{if the $m$-th coin lands on head} \\ 0, & \text{if the $m$-th coin lands on tail} \end{cases} $$
Then $(X_m)_{m=1}^{n}$ are independent Bernoulli RVs with $X_m \sim \operatorname{Ber}(P_m)$. Moreover, $X = \sum_{m=1}^{n} X_m$. So
$$ E[X] = \sum_{m=1}^{n} E[X_m] = \sum_{m=1}^{n} P_m. $$
Although not asked by OP, it also allows to compute the variance easily, showing the usefulness of this representation:
$$ Var(X) = \sum_{m=1}^{n} Var(X_m) = \sum_{m=1}^{n} P_m(1-P_m). $$