In order to produce a religious unit (ie, prophet, missionary, or inquisitor) of a given religion, you must produce it at a city that follows that particular religion.
If you've gotten to the point where you no longer have control of any city that follows a particular religion, then you're out of luck.
There are a couple of ways I've used in the past to save a religion though:
- If you still control the Holy City for your religion, it gives off some pressure. However, the pressure from your own nearby cities following an enemy religion are likely overwhelming this pressure.
- Did you manage to convert any nearby city states or other civ cities? It might be worth it to declare war and take control of a city that follows your religion so you can begin to rebuild.
Finally, you may want to just write your religion off - even if you're not the founder, you can still get bonuses from a religion from the Follower Beliefs. If the founder is gone, they're not getting any benefits, so there's less incentive to wipe it out. Likely the time and faith you'd invest in trying to recover your religion would not be worth the effort, if there's a considerable amount of "bad" religion in the world.