Example of a topological vector space such that $E = M \oplus N$ algebraically, but not topologically
Let $M$ be a proper dense subspace of an infinite dimensional $E$, and pick $N$ to be any algebraic complement. Then $E=M\oplus N$ algebraically by construction, but the direct sum is not of topological vector spaces, as the projection $E=M\oplus N\to N$ is not continuous: its kernel is $M$, which is not closed.