Sorry to read about your troubles. I can certainly relate in regards to engine troubles. That being said, it is really hard to diagnose major engine related problems through the web, but from what you are describing, it sounds exactly like what happened to me. I've got almost $5K into new heads and a rebuilt short block and miscellaneous other parts to get my Montero back on the road, and I haven't even dropped the engine back in yet.
First, it could be that the timing belt let loose, and this being an interference engine (meaning the valves will hit the pistons if the engine isn't timed correctly) you may have bent valves, but since you stated the knocking started a couple of months ago that is least likely.
If I had to make a semi-educated guess, your crank and/or rod bearings were becoming suspect and finally let loose. Based on what I've spent so far, if you can find a replacement engine in the junkyard to replace yours with, that is the least expensive option available to you, depending on if you have the resources and assistance to do so. Expect to spend at least $1500 on a junkyard engine.
I've got $1600 into my short block alone, but the crankshaft was trashed, and number 4 piston was coming apart, so that is an extreme situation. New Heads are $300 each, so this can get expensive really quick.
Of course this is all a guess. If you have someone that can help with wrenching duties, first thing I would check is the timing belt, and then I'd pull the oil pan and the main webbing and inspect the bearings for wear.