I feel guilty for having masturbated for some time, is there something I can do?
Repentance is not valid without three things: remorse for sin, abstention from it, and the resolution to not return to it. When one of these conditions is not met, repentance is not valid. This is the rule for repentance for sin between the servant and his Lord...and
"The one who turns from sin is like one who never sinned."and
Satan frightens you of poverty and prompts you to [commit] indecent acts. But Allah promises you His forgiveness and grace, and Allah is all-bounteous, all-knowing.