If the loan was personal, it would be considered a nonbusiness bad debt. Nonbusiness bad debt is only deductible when it becomes completely worthless - meaning there's no chance you'll ever collect any part of it like you mentioned. You would claim this as a short-term capital loss on Schedule D and Form 8949.
If the loan was business related, you can deduct the bad debt as a business expense. It doesn't have to be completely worthless. You can deduct the portion of the debt that you know you won't collect.
In either case, you'll need to keep record of the following documentation:
- original loan agreement
- attempts to collect
- evidence showing when/why the debt became worthless