Obviously, if they foreclosed on you, that means you weren't paying them money that was rightfully theirs. I'm pretty sure you knew that you weren't paying them so this foreclosure shouldn't have been a surprise. If you dont pay, the mortgage contract states that they get the house. You broke the contract - they got the house. You're too late to do anything now unless your state has a redeption period and you have cash on hand to pay back everything you owe including late charges and lawyer fees.
Your tenant has probably about 30 days since they/you could force the new owner to formally evict them in court. Your tenant might also make some money off this ordeal if the new owner offers them cash to get out now, which is becoming customary.
I really hope you weren't taking money from the tenant and not forwarding it to the bank to pay the mortgage...I wonder if your tenant would have a legal claim against you if this were the case...