Beamforming in ultrasound imaging has significant impact on the quality of the final image, controlling its resolution and contrast. Despite its low spatial resolution and contrast, delay-and-sum is still extensively used nowadays in clinical applications, due to its real-time capabilities. The most common alternatives are minimum variance method and its variants, which overcome the drawbacks of delay-and-sum, at the cost of higher computational complexity that limits its utilization in real-time applications. In this paper, we propose to perform beamforming in ultrasound imaging through a regularized inverse problem based on a linear model relating the reflected echoes to the signal to be recovered. Our approach presents two major advantages: i) its flexibility in the choice of statistical assumptions on the signal to be beamformed (Laplacian and Gaussian statistics are tested herein) and ii) its robustness to a reduced number of pulse emissions. The proposed framework is flexible and allows for choosing the right trade-off between noise suppression and sharpness of the resulted image. We illustrate the performance of our approach on both simulated and experimental data, with \textit{in vivo} examples of carotid and thyroid. Compared to delay-and-sum, minimimum variance and two other recently published beamforming techniques, our method offers better spatial resolution, respectively contrast, when using Laplacian and Gaussian priors.