stay away from drugs!! seriously... even if he just 'took the blame for others' (which you can't really know) even the fact he hangs out with people like that... you don't want the drama or possible heartwreak, imho
I agree with others: missing him can paint him into this wonderful awesome guy when in fact you're probably (muchly) in love with your imagination (you'll find out when he gets out if he lives up to it any)
don't do letter sex, especially if it's not that great... if that's you in the avatar, you can do way better..!!
Thank god if you do meet someone new, and I suppose then you'll be head over heels with that new guy anyway... so most you can try is to end it with that guy who's in jail now amicably.. (hence write to him like you would to a brother or friend) if you do want to give him a chance, see if he mans up to the real world an stays away from drugs, if not 'no go' - you're too valuable to be a 'crack mama' or something like that!! If he loves illegal substances more than you, you deserve better!!
I've had crushes on people who were no good for me too, and 'OCD-ing' on that, especially when stressed about something or such - try to work on problem-solving and relaxing - maybe he'll stop being attractive then!
Some people do seem to find people in jail attractive... maybe something about them being unavailable...? You could work on that tho.. there are books and programs for that
Good luck hun & take care!