How to convert filter into frequency domain to do filtering?
Your filter is an FIR filter, therefore its coefficients are simply the impulse response $h[n]$. Your signal $x[n]$ can be filtered in time domain by convolving with impulse response: $$y[n]=x[n]\star h[n]$$ 
Knowing that convolution in time domain is equal to multiplication in frequency domain $$Y[f]=X[f]H[f]$$
you only need to calculate two DFT's.

One thing to remember - output will be of the same length as input signal.

Speaking Matlab'ish:

filter_2 = firceqrip(2,0.6,[0.05 0.03]);

freqs = [0.08, 0.2, 0.32, 0.4];
periods = 1./ freqs;
t_max = 4 * periods(1);
t = linspace(0, t_max, 50);

signal = sin(2*pi*0.08*t) + sin(2*pi*0.2*t) + sin(2*pi*0.32*t) + sin(2*pi*0.4*t);

%% NEW CODE HERE %%
% Output is same length as input signal
M = length(signal);
% Find next power of two for sake of calculations
M2 = 2^nextpow2(M);
% Calculate the FFT's
Hf = fft(filter_2, M2);
Xf = fft(signal, M2);
% Multiply in frequency domain
Yf = Hf .* Xf;
% Perform the IFFT
y = ifft(Yf);
% Take only M samples
y = y(1:M);
% Remove this nasty imaginary parts
% comming from round-off errors
y_r = real(y);

% Call the in-built function for sake of comparison
y_l = filter(filter_2, 1, signal);

% Plot the original signal
subplot(311)
plot(signal)
grid on
title('Original signal')

% Plot the results
subplot(312)
plot(y_l);
hold on
plot(y_r, 'r--')
grid on
legend({'in-build function', 'user function'})
title('Filtered signal')

% Plot the relative error
subplot(313)
plot(abs(y_l - y_r))
grid on
title('Relative error')


Comparison of results below. As you can see, it matches perfectly MATLAB filter function.