Yes, according to the 5th Circuit Court of Appeals, which is the highest federal appeals court for Texas, next to the U.S. Supreme Court.
In a recent court case, the 5th Circuit stated:
The sole question presented here is whether Appellants Wells Fargo, N.A., et al. (“Wells Fargo”) can move for attorney’s fees under Rule 54(d)(2) of the Federal Rules of Civil Procedure. Appellee Richardson (“Richardson”) sued Wells Fargo in Texas state court. After Wells Fargo removed the case to federal court, the district court dismissed all of Richardson’s claims. Wells Fargo then filed a motion for attorney’s fees, which the district court denied as being unauthorized by Rule 54(d)(2). We conclude that the bank may utilize this Rule and therefore reverse and remand the case for further proceedings.
So, if you are going to sue your mortgage company, plan on winning the case. Because if you don't win, you will likely have to pay their attorney fees.
They will add them to the balance due on your mortgage, and if you can't catch up the mortgage, they will foreclose. And if you still owe them money after they foreclose, they can sue you for the deficiency balance. If you are unable to pay the defiency balance and you qualify, you could still file a bankruptcy case to discharge the remaining debt.