There are a few Scripture passages that are helpful in looking at this addiction. I understand what you are going through, I've been there myself. I know exactly what you mean when you say that feel terrible after you've masturbated. I have come to believe that masturbation can be a tool that Satan uses to draw people in, to meet a felt need, and then the accusations fly. this is especially difficult if your desire is to please God alone and you find yourself falling into sin. I will not invite the argument and say that masturbation is a sin for everyone, but it sounds like, for the OP, it is clearly a sin. His heart is broken when he engages and so now he desires to abstain. Let's help him, encourage him and build him up toward that end.
1 Thessalonians 5:4-11
4But you, brothers, are not in darkness so that this day should surprise you like a thief.
5You are all sons of the light and sons of the day. We do not belong to the night or to the darkness.
6So then, let us not be like others, who are asleep, but let us be alert and self-controlled.
7For those who sleep, sleep at night, and those who get drunk, get drunk at night.
8But since we belong to the day, let us be self-controlled, putting on faith and love as a breastplate, and the hope of salvation as a helmet.
9For God did not appoint us to suffer wrath but to receive salvation through our Lord Jesus Christ.
10He died for us so that, whether we are awake or asleep, we may live together with him.
11Therefore encourage one another and build each other up, just as in fact you are doing.
In this passage, Paul speaks of the need for self control, especially in times of darkness. I would encourage getting a face-to-face accountability partner that will pray with you, encourage you and ask you if you are engaging in masturbation. I have found that to be a huge help. I also would make sure that when the tempation hit you, you could contact that person right then and ask for prayer. This is territory that Satan wants to take from you and you need partnered, voiced prayer to overcome IMO.
Now, look at this passage from 1 Corinthians 9:25-10:13
25Everyone who competes in the games goes into strict training. They do it to get a crown that will not last; but we do it to get a crown that will last forever.
26Therefore I do not run like a man running aimlessly; I do not fight like a man beating the air.
27No, I beat my body and make it my slave so that after I have preached to others, I myself will not be disqualified for the prize.
1 Corinthians 10
Warnings From Israel's History
1For I do not want you to be ignorant of the fact, brothers, that our forefathers were all under the cloud and that they all passed through the sea.
2They were all baptized into Moses in the cloud and in the sea.
3They all ate the same spiritual food
4and drank the same spiritual drink; for they drank from the spiritual rock that accompanied them, and that rock was Christ.
5Nevertheless, God was not pleased with most of them; their bodies were scattered over the desert.
6Now these things occurred as examples[
c] to keep us from setting our hearts on evil things as they did.
7Do not be idolaters, as some of them were; as it is written: "The people sat down to eat and drink and got up to indulge in pagan revelry."[
d]
8We should not commit sexual immorality, as some of them didand in one day twenty-three thousand of them died.
9We should not test the Lord, as some of them didand were killed by snakes.
10And do not grumble, as some of them didand were killed by the destroying angel.
11These things happened to them as examples and were written down as warnings for us, on whom the fulfillment of the ages has come.
12So, if you think you are standing firm, be careful that you don't fall!
13No temptation has seized you except what is common to man. And God is faithful; he will not let you be tempted beyond what you can bear. But when you are tempted, he will also provide a way out so that you can stand up under it.
We will experience temptation, but we are called to bring our physical self under submission, not giving in to it's lusts. It sounds to me like you already know that this is so, but needed a little biblical confirmation. If there is a lust of the flesh that controls us, then we are it's slaves. We are to be the slaves of no one save Christ.
Finally, have a look at Galatians 5:18-25. The KJV has words that are less vague than some of the modern translations. Notice uncleaness, which was mentioned earlier as well as fornication. I know that you're not physically fornicating, but if you're like me, the imaginations of your mind while you are masturbating are fornication. That is sin, as Jesus said to the men that anyone who looks at a woman to lust after her has commited adultry.
18But if ye be led of the Spirit, ye are not under the law.
19Now the works of the flesh are manifest, which are these; Adultery, fornication, uncleanness, lasciviousness,
20Idolatry, witchcraft, hatred, variance, emulations, wrath, strife, seditions, heresies,
21Envyings, murders, drunkenness, revellings, and such like: of the which I tell you before, as I have also told you in time past, that they which do such things shall not inherit the kingdom of God.
22But the fruit of the Spirit is love, joy, peace, longsuffering, gentleness, goodness, faith,
23Meekness, temperance: against such there is no law.
24And they that are Christ's have crucified the flesh with the affections and lusts.
25If we live in the Spirit, let us also walk in the Spirit.
I've forgotten what your name was OP, but I want to say that I applaud your efforts. It is clear that you are seeking God with all of your heart. He will reward you. This may be a very tough battle, but when you win, you will have won some very precious territory from the hand of Satan. You will be able to build up others with the strength you have gained from the fight and you will have wisdom that not everyone has. Stand firm then friend!