Multiplying the imaginary part of DFT with a linear ramp to get a derivative
I've changed my mind during the answer. Instead of using frequency domain processing to get the derivative signal, I will provide a more direct and clean approach to get the derivative of a signal by using what's called a digital-differentiator.  An LTI filter, which is applied into the samples $x[n]$ of a signal $x(t)$ and computes the samples $y[n]$ of the derivative $y(t) = x(t)'$ of $x(t)$.
Below is the matlab code you can use to compute the samples of the derivative of a bandlimited signal $x(t)$:
N = 512;                   % length of x[n]; samples of signal x(t).

% Assume Gaussian pulses added:
t = linspace(-1,1-2/N,N);  % time is sampled at T = 2/N period.

sigma = 0.001;             % Gaussian pulse shape parameter (adjust accordingly)
x1 = 2*exp(-(t.^2)/(2*sigma) );         % Gaussian pulse one
x2 = 0.5*exp(-((t-0.5).^2)/(3*sigma) ); % Gaussian pulse two
x = x1 + x2;               % total signal


% Generate differentiator impulse response hc[n]:
T = 2/N;                  % sampling period (implicit, defined above)
n = -N/2:N/2;
h = ((-1).^n)./(n*T);
h(N/2+1) = 0;
w = hamming(2*N/2+1)';
hc = w.*h;                % causal,stable impulse response hc[n]


% Filter x[n] to compute samples of derivative signal
y = conv(x,hc);
yd = y(N/2+1:N/2+N);     % extract relevant portion

% display the result:
figure,plot(t,x);
hold on
plot(t,0.1*yd);
legend('x(t)','dx/dt');
grid on
title('x(t) vs dx(t)/dt  (scale adjusted to fit both');

The result is :

For getting the same result using DFT techniques,
the following code can be used :
M = N+N;
H = fft(hc,M);          % generate the RAMP mask to apply on X(w)
Y = fft(x,M).*H;        % obtain ramp multiplication in freq domain
y = real(ifft(Y,M));    % invert back to time domain
y = y(N/2+1:N/2+N);     % extract relevant portions

figure,subplot(2,1,1)
plot(linspace(0,2,M),abs(H)); title('RAMP mask that is applied on X(w) in freq-domain')

subplot(2,1,2)
plot(t,x);
hold on
plot(t,0.1*y);
legend('x(t)','dx/dt');
grid on
title('x(t) vs dx(t)/dt  (amplitude scale adjusted)');

with exactly the same result on the time-domain sequence as shown below: