I take it you're between the ages of 16 and 24? If so, everything you're going through right now is completely normal for that age group. The modern world offers us so many choices that it takes a while to find the right one. Most people go through a couple of bad relationships before finding the right now, and change their mind about their career path a couple of times before finding the right one. It can be frustrating not being able to see the future and knowing where you'll end up, and often not even knowing which way to go. But you just have to learn to live with the ambiguity. You'll figure things out, but it doesn't always happen over night.
Since you've brought up a few different issues, I'll address each one separately starting with your ex. I think you already know the answer to this one. You shouldn't be talking to him. It just leads to complications, and you were doing better when he was out of your life. So go back to no contact. You've managed it once before, so you'll manage it again once you decide you have to.
As for your friend, you should just tell him that you're not interested, and that it's best if you don't spend any time alone together. Aside from the fact that he's not what you want, he's not even available as he has a girlfriend. That is a route you DON'T want to go down. Things would get complicated and messy very quickly. Besides if he's cheating on her, he's likely to cheat on you. Do yourself a favor and just stay away from all of that.
The career issue comes back to what I said before about not knowing where you're going. If you're hoping to find something, then start researching careers that interest you. If you don't know what you're interested in, you can google "free career aptitude" test and find tests that will help you match your skills and interests with career ideas. If you're in school, you can probably meet with a counselor at your school who may be able to help as well.
Just breathe, and try to take everything one step at a time. None of what you're going through right now is really as bad as it seems. You're just moving a few steps closer toward finding your path in life. If you find out the decisions you make are the wrong ones, you can always go back and change them later. Don't put too much pressure on yourself to have it all figured out.
“This planet has - or rather had - a problem, which was this: most of the people living on it were unhappy for pretty much of the time. Many solutions were suggested for this problem, but most of these were largely concerned with the movement of small green pieces of paper, which was odd because on the whole it wasn't the small green pieces of paper that were unhappy.” ― Douglas Adams, The Hitchhiker's Guide to the Galaxy