well the use of fourrier analysis is the best method to change a square wave into a sum of harmonic sinusoidal waves mathematically.
practically you need to use wave shaping ciruits that employ diodes. the type of filter you want depends on which frequencies do you want to eliminate and which one do you want to preserve.. for instance, if you want to discard the high frequency components of the square wave you can design a low pass filter using its transfer function. the low pass filter will automatically convert the low frequency components of the square wave into sinusoid harmonics and give you low amplitude sinusoidal functions.
more please read the book singals and linear systems by Lathi. you can download this book from the internet through mediafire.com