For the past few years I have been using prayer to fight my temptation. I pray and my temptation goes away. I however started to do a different thing like picture a certain thing and that works too. But if that works too than does that mean my getting rid of temptation was phsychoscamatic? Or because I sometimes I question my salvation but the fact that God answers my prayer every time made me feel like I am saved (if that makes sense) is this all in my head and I'm just going to hell?
Sounds to me more like you found an effective way of resisting temptation for one thing so the devil is going to try to tempt you to something else. Which is more relevant to determining your spiritual condition: your desire to resist temptation or the method you employ to resist it? Are feelings the determinant of salvation? If so then there's no certainty of salvation for any of us because feelings and moods change on a whim. If not then you're going to need some sort of objective reality or standard to believe in the face of changing feelings.
Is there anything you know you could be doing to make your salvation more certain but you've left undone? If not then you've done all you know you can an have no more ability to influence your final destination. But on the bright side, if God and faith are all in your head then there's a good chance that hell is all in your head too.
So rejoice that God has given you the strategies and the strength to overcome temptation and see that as a token of his desire to completely rescue you from sin and evil through the salvation offered in Christ, which he is just as capable of doing.