How can i foreclose on 1 rental property without effecting my house?
I have 2 rental properties with the same bank. I’m thinking to foreclose in one of them and keep the other for longer.How does it effect my second rental property and more importantly, does it effect my primary residential property or my bank accounts?

They can’t come after your 2nd rental, but the may be able to go after you.
I think what you are asking for can be answered with a lot of "depends". The most important thing is that you understand the big picture. Go to a real estate lawyer and a tax person so you know exactly what your particular situation will result in.
Here are some of the things to think about.
1) In some states, when a bank forecloses on you, they can’t do anything more (no deficiency judgments). In some they can go after ALL their lost costs (judgment for lost principle, foreclosure cost, lawyer costs, etc).
2) If you have a 2nd loan, unless it is a purchase money loan, the bank can most likely go after you. Have a Real estate lawyer review your loan papers.
3) Understand the tax consequences and how it will affect you both state and federally.
3.1) If bank receives less then it’s costs from foreclosure, that delta is considered your income
and you will be taxes on it (depending on how your state handles it). See a tax accountant.
3.2) Federally, depending on your situation, you may also owe. There is a Federal Tax Relief program where the federal government is giving relief of the original base amount the the property was purchased at, but if you took more out of the home then you bought it for…you may owe additional taxes to the Fed. Again, see your tax person.
Once you understand the bigger picture, you can determine if trying to do a short sale…and getting a little bit more, may be in your best interest. Sometimes it is, sometimes foreclosure may be in your best interest.
Make sure you get professional help on this. You don’t want to be surprised.
Good luck!