Taking the area under a square pulse
A good strategy in the presence of white noise would be to do a moving average over the number of samples that equals the length of the pulse. The peak of this moving average will be your area with the noise optimally minimized. 

So if you use MATLAB or Octave it would be as simple as this, assuming the pulse is 200 samples wide:

out = filter(ones(200,1),1,in);
area = max(out);


Or otherwise convolve your data with a sequence of 200 ones.

Using the Python scipy.signal package this is equivalently:

out = sig.lfilter(np.ones(200,1),1,in) 
area = np.max(out)