I made a promise to God on my salvation and broke it. I accepted Jesus back, but did I lose my salvation because I broke my promise? I made my promise in my mind, so I don't know whether I meant it or not, so please answer if I meant it and did I lose my salvation if I meant it. One more question: Can God forgive promises before you break them; like if there is a promise and it won't keep, can God forgive it before its broken?
The problem is that you are breaking Christ's laws in making these foolish promises to yourself. "But I say to you, do not swear at all: neither by heaven, for it is God's throne; nor by the earth, for it is His footstool; nor by Jerusalem, for it is the city of the great King. Nor shall you swear by your head, because you cannot make one hair white or black. But let your 'Yes' be 'Yes,' and your 'No,' 'No.' For whatever is more than these is from the evil one" (Matthew 5:34-37). A Christian says exactly what he means. He doesn't need a set of meaningless words to make his statements more true or real.
You sinned by making a promise based on something that you had no control over. God is the one who decides who is saved and who is not. Therefore, you are expecting God to uphold a promise that you sinfully made -- that is never going to happen.
I don't know what you promised, but what you need to do is simply obey God and do what He commands. You don't need promises in that regard. When someone asks something of you, keep your word. You promises, oaths, vows, are not necessary.
Apologize to God for making these foolish promises and go on with your life.