You can deduct the unpaid principal if you can show that the debt is fully worthless. The fact that the borrower filed for bankruptcy does not automatically establish worthlessness. However, even if you can establish worthlessness, you can only deduct the unpaid principal. As a cash basis taxpayer, the interest you were to receive was never reported as income so no bad debt deduction is allowed for this amount.
Rules that limit the deduction of losses from passive activities to income from other passive activities. Passive activities include investment rental operations or businesses in which you do not materially participate.