A step by step derivation of Ewald summation can be found in:
Williams, D. E. (1971). Accelerated convergence of crystal-lattice potential sums. Acta Crystallographica Section A, 27(5), 452–455. doi:10.1107/S0567739471000998
Some additional papers that might help you are:
De Leeuw, S. W., Perram, J. W., & Smith, E. R. (1980). Simulation of Electrostatic Systems in Periodic Boundary Conditions. I. Lattice Sums and Dielectric Constants. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, 373(1752), 27–56. doi:10.1098/rspa.1980.0135
and
Nijboer, B. R. A., & De Wette, F. W. (1957). On the calculation of lattice sums. Physica, 23(1-5), 309–321. doi:10.1016/S0031-8914(57)92124-9