An optimal control problem with an infinite horizon quadratic cost functional for a linear system with point-wise and distributed time delays in the state variables is considered. The case, where the cost functional does not contain a control cost, is analyzed. The latter means that the solution (an optimal control) of the considered problem is singular. This control problem is solved by a regularization method. Namely, it is associated with a new optimal control problem for the same equation of dynamics. The cost functional in this new problem is the sum of the original cost functional and an integral of the square of the control with a small positive weighting coefficient. Due to the smallness of this coefficient, the new problem is a cheap control problem. Using the singular perturbation technique, an asymptotic analysis of this cheap control problem is carried out. Based on this analysis, the infimum of the cost functional in the original problem is obtained, and a minimizing control sequence is constructed.