Keep trying is definitely one thing! And you're already doing that which is great! Don't ever suffer defeat!
I've been trying to loose some extra weight I've gained, but have a problem with motivation as well. I'm currently living away from most of the people I'm close to. My husband has even been transferred temporarily to another state, so I only see him every other weekend. But from this, I found out that I'm most motivated when I have people around to help in my effort! If you have a husband, boyfriend, any family, friends, etc, around, and you have spare time; invite them to go out, jogging, just general exercising. Its harder to do things alone, not from fear necessarily. But it may help just give you some extra mental support.
Some things I do also is just add little reminders of my goal throughout things I use everyday. For example, my computer background is a picture of a couple I want to be able to dress as perfectly with my husband for next Halloween. My phone background is a motivational picture for weight-loss I found on Google, just to help remind me what my body could be like. And since I look at my phone at least every few hours, it's a good reminder.
Don't starve yourself of course; but also don't cut out EVERYTHING you find unhealthy also. Make sure to treat yourself every once in a while, otherwise the cravings will only be worse when you finally give in.
Something I learned from a yoga instructor food-wise: Try to stay away from foods in the aisles of stores. Stick to the sides, where they have food at their freshest, like fresh vegetables and fruits, meats, like chicken and fish.
Make sure to have goals to, and make a list of SMALL steps to reach them. Just having a goal in mind, especially if its something that may take a good while, may just make it feel more overwhelming than it should.
If your goal is to loose 100 pounds, start it out first at 10 or 15. It'll help you feel more successful once you just lose 15 pounds. Then once you get there, just start it over again for another 15 pounds.
It might get harder to lose weight the closer you get to that FINAL goal, but that's normal. So just keep pushing!
Those are just some stuff people have told me, or that I find helpful to myself. So I hope it helps.
One last thing: CONFIDENCE! STAY POSITIVE! Keep good feelings in mind as much as you can. It's good for the immune system, and if you can stave off stress, that'll be helpful in the long run as well. Sometimes when I feel unmotivated it makes me feel weak, useless, or a failure. Push those feelings out and remind yourself of what you can do if you just get up and do it! I think people sometimes forget how strong they can be. So maybe remembering it may help!