Open Question: Foreclosure on a house?

So my husband and i had to move out of state due to him losing a job and getting another one in another state. We wrote the bank a hardship letter, gave them financial information etc so we could work something out so we could keep our house back in California. Right now we have a tenant in it paying 1,400 a month but our house payments are 1622 plus 75 for the property manager. My husband now makes 2700 a month and we have to pay 900 in rent here. Anyways, my question is, our bank denied us modification to our loan. We have yet to default because we were hoping they would help us out but we really can't afford to keep it. How long does a foreclosure take? What is the process? How long will it stay on our credit reports? Thanks