The first thing you're doing wrong is trying to grow the tomatoe indoors. Are you living at one of the poles or something?
The plant would be happier, stronger, and healthier outside for too many reasons to list here now (don't make me do it).
It sounds like blossom end rot; cut the watering to just the base of the plant; nothing on the leaves. Secondly, mix one part milk to ten parts water (or so; I just dump a cup of mmilk in an old gallon jug and fill with water) and spray the leaves with this mixture. You'll get fruit sets soon after; but will they have time to ripen? That's the question.
If the cold weather comes before that you can 1) bring it back indoors and try to keep it going (you see how that's working out) or 2) uproot the plant and hang it somewhere dark,warm and dry until the fruit ripens (there's usually enough juice left in the stems to keep things going that long)...