To depreciate a computer for work, first you must have some kind of log book or other record of how much use was personal and how much use was work. Without that, you are likely to lose the entire deduction in an audit.
Then, sometimes you can take section 179 depreciation, which means depreciating property all at once. If you use it 100% for business you can depreciate 100% when placed in service. But section 179 assumes you will use the property for business for its entire class life. If your percentage of business use changes, you have to pay back the unearned depreciation. The class life for a computer is 5 years or 60 months. So let's say you take section 179 as of November 2017, with a business use percentage of 100%. And in January 2018, you take it out of business and use it exclusively for personal. On your 2018 tax return you will have to pay back 58/60ths of the depreciation deduction you took in 2017.
Or suppose that you take section 179 on your 2017 tax return based on 100% of business use. From January - March 2018 you use it 80% for work. Then from April-June you use it 60% for work. Then in July you use it 90% for work. And so on. You will again have to pay back part of the depreciation but you can see how complicated the calculation will be.
Section 179 is really only practical for assets that will remain 100% business use for their class life.
You can take regular deprecation instead. For a class life of 60 months, bought in November, used 100% for business, you would deduct 2/60th of the price as your depreciation allowance for 2017. Then in 2018, you can keep track of your business percentage for the whole year. if it averages out to, say, 20%, then on your 2018 tax return you can deduct 12/60th x 20% as a depreciation allowance. And so on until the computer is 100% depreciated.
Important! If you are a W-2 employee, you will not be allowed to deduct unreimbursed business expenses starting on your 2018 tax return. So no depreciation of computers or anything else. But you would still be subject to the recapture rule if you take section 179 in 2017 and then stop using the computer for work in 2018. (Actually section 179 recapture is triggered if your percentage of work use every drops below 50%.)
Also if you are a W-2 employee, your unreimbursed work expenses are limited to the amount that is more than 2% of your income and you must itemize your deductions to benefit. Any deduction, even if you take section 179, is likely to be partial at best.
If you are self-employed, the rules for depreciation and deducting business expenses have not changed.