After getting hints from the comments and lot of literature survey, I have solved the above problem by myself. The above said error can be minimized by means of Tikhonov regularization of second order. Error term in general Tikhonov regularization is given as
$$E = {\|\textbf{A}\textbf{X}-\textbf{B}\|^2_2+\lambda\|LX\|^2_2}$$
Where $\lambda$ is damping factor and $L$ is regularization matrix. $L$ can have many forms. If $L$ is replaced by an identity matrix $I$, it is known as ridge regresion. Another common practice is to replace $L$ by finite order difference matrix. For our concerned error term, $L$ will replaced by second order difference matrix, i.e.
$$L=
\left[ {\begin{array}{cccc}
-1& 2 & -1 & & & 0\\
& -1 & 2 & -1 & & \\
& & ... & ... & ... & \\
& & & -1 & 2 & -1\\
\end{array} } \right]$$
The solution by Tikhonov regularization can be then obtained by solving the following linear system:
$$\left[ \begin{array}{cc} A \\ \lambda L\end{array}\right]X =
\left[ \begin{array}{cc} B \\ 0 \end{array}\right]$$
You will have to decide on value of $\lambda$ (see L Curve in references).
References:
- Noschese, Silvia, and Lothar Reichel. "Inverse problems for regularization matrices." Numerical Algorithms (2012): 1-14.
- Calvetti, Daniela, Lothar Reichel, and Abdallah Shuibi. "Invertible smoothing preconditioners for linear discrete ill-posed problems." Applied numerical mathematics 54.2 (2005): 135-149.
- Hansen, Per Christian. The L-curve and its use in the numerical treatment of inverse problems. IMM, Department of Mathematical Modelling, Technical Universityof Denmark, 1999.