I have read that a fasting person is constantly in the worship of Allah (of course if he maintains it’s conditions). My question is I know that every moment we waste on earth not in the remembrance of God will be a regret in Barzakh so can a person take up fasting?

Since he is fasting he will always be under the worship of God so even even if this person is sleeping he is still doing worship and won’t regret this time in Barzakh.
Is this a correct veiw?

Fasting is definitely one of the best ways to be in remembrance of God. There are certainly other ways, including helping people and serving one’s family and children. If one purifies (wudhu) prior to going to bed it will be like they worship all night.