As we approach Father's Day this year, my heart goes out to you and to the millions of other fathers who are in a similar situation. You face a difficult task (especially if your former wife has remarried) - but it's not an impossible one, and I'm thankful for your concern for your children.
The most important thing I can tell you is that God loves you and is concerned about you and your children - and He wants to help you become the best father you can be. The Bible says, "As a father has compassion on his children, so the Lord has compassion on those who fear him" (Psalm 103:13). If you have never done so, ask Christ to come into your life. You need His forgiveness, and you need His wisdom as you relate to your children.
How can you be a better father? First, ask yourself what your goals would be if you were with your children all the time. What would you be teaching them - about life, about God, about setting goals, about dealing with people, etc.? Then take that list and ask yourself what you can still teach them, in spite of your limited contact. You can't do everything - but you can make a start, and you can help prepare them for adulthood.
Does this mean you can't have any fun with them? No, of course not. But don't make the mistake of simply entertaining them. Let Jesus' example be your goal, who as a boy "grew in wisdom and stature, and in favor with God and men" (Luke 2:52).