Matlab: Estimating power spectral density of an experimental data?
MATLAB has built-in functions taking care of the steps you mention in 2. You can check out the pwelch function (here) which uses Welch's method for PSD estimation.(here) 
The choice of segment length, number, overlap and windowing function presents a trade-off between bias and variance.