As the earlier posters have said, there may very well be a workable solution available to a home owner instead of foreclosure. Please expore all available avenues.
Regarding your question: It is quite likely that a foreclosure on your credit report will prompt the credit card issuer to cancel the card. Most credit card issuers regularly monitor the FICO scores of people they have issued cards to. A foreclosure will result in an extremely negative FICO, so whenever the issuer checks - BOOM! Credit card cancelled! One more reason to avoid foreclosure if at all possible.
If I can provide any help, don't hesitate to contact me.