Why do we get the following equation in case of a One Time Pad? If m: message, M: message space, k: key, K: keyspace, c: cipher, C: cipher space and $E_k$: encryption function, such that
$E_k(m) = c,\ m,m^* \in M,\ k\in K,\ c\in C.$

My first question is, is the following equation correct for One Time Pad encryption?

$$P[E_k(m) = c] = \frac{ \sum_{m_ i\in M} \sum_{k_ i\in K} P[E_ {k_ i}(m_ i) = c] } {|M|.|K|} $$

And, my second question is, why do we get that?
I'm not fully sure if the equation is correct, as I think $P[E_{k_i}(m_i)=c_i]=1$, as the encryption always produces a cipher text (which is what you formulated I think, as there's no definition of $c_i$).

If you change the $c_i$ to $c$ however you'd calculate the average probability that any message-key-pair encrypts to $c$.

I didn't take part in such a course yet, but this looks right as for the OTP the probability that a certain message encrypts to a certain ciphertext under a certain key is basically the same as the probability that any message using any key encrypts to this specific ciphertext. So this would mean that you can't derive any relations between ciphertext and plaintext because any plaintext-key pair could match your ciphertext. This sounds pretty much like perfect secrecy and hence like an OTP.

I hope this helps you.