The remaining (adjusted) cost basis of the building on your tax accounting books' balance sheet should be the original cost of the building, adjusted (reduced) by the amount of depreciation taken on the building during the time you used it (and depreciated it) in your pet supply business. I take it that your question is how should you, now that it has become a rental property, depreciate that remaining, adjusted tax basis - the building part, and not the land.
It seems to me like it's pretty much perfectly straight forward double-entry tax accounting. Of course the building has a tax basis, and of course that basis has been reduced by the amount of depreciation already taken on the building. And the question is how to now claim depreciation on the building during its use in your rental activity.