Nikon d40 broken flash?

I dropped my nikon and my flash is broken i'm uninsured and the repair will be quite expensive. Will it be okay if i were just to buy a separate flash?

Sure. An sb-400 for example, simple, cheap.

SB400 does the same job, plus a bit more, and probably will cost the same as a the repair. You could even think about a Metz flash.

A separate flash will be better than the inbuilt. You can go for a Nikon branded speedlight which will meter and fire the flash automatically (TTL flash). Or you can go for a cheaper manual flash & learn to light manually. SB400 is the cheapest TTL replacement you can get, but it doesn't have a swivel head - it'll be fine though if all you want to do is replace the inbuilt.
If you want to get into portraiture, you'll need to use the flash OFF camera - that's where radio triggers (£25 a set for RF602's) will come in handy.