The first difference between an imac and build your own is not so much cost as it is space. The Imac fits everything into a relatively small, neat package. The second difference is whether you want to do repairs/upgrades or whether you want someone else. The imac has good support from Apple, but you won't really be able to change anything once you buy it. If you build your own, you can easily upgrade, but you will also be the one who has to fix anything that breaks.
You should also consider that an Imac will probably hold its value much better than anything you build.
You can buy a 5k monitor similar to the one on the 5k imac from Dell. It will cost about $2000. If you don't need a cutting edge screen, you could save a lot of money by...