Depreciation when sole proprietorship is closed

I started a sole proprietorship in 2024 and want to claim depreciation on equipment purchased which I understand will be depreciated over 5 years. What happens if I have to close the business before the equipment depreciation value is down to zero? How would this affect my tax filing when I closed the business? Would I then be owing taxes on the remainder of the value of the equipment and would it be considered income at that point?