What to expect from your employer
Most employers will be sensitive to your situation and will understand that you may need to take time off in order to recover from the attack. If your employer is unreasonable and does not allow you to take time off or, in a nightmare scenario, dismisses you for a reason connected with your absence, you may well have a claim for unfair dismissal or discrimination against them. In such a situation, an Employment Tribunal would almost certainly take a rather dim view of the employer's actions.
Obviously, it may be difficult to talk to your employer about your ordeal: however, you should really try to keep them informed as much as possible, so that they can adequately deal with your absence. In particular, you should (if possible) keep them informed as to when you are likely to return to work: this will enable them to work out how to cope with distributing your work in your absence.
The very least that you should expect from your employer is a sensitive hearing of your situation. In all employment contracts there is an implied term of mutual 'trust and confidence' and that term controls, to some extent, the behaviour that can be reasonably endured and expected by each party.
If your employer acts unreasonably in relation to your illness, they could, potentially, be breaching this term. If this is the case, you could ultimately resign and claim that you were constructively dismissed. Following this, you could potentially claim for unfair dismissal or breach of contract. Quite clearly, this is a highly unreasonable situation in which to be placed by the employer - why should you have to resign when they have acted so inappropriately? But in a worst-case scenario, that's your ultimate sanction.
Back at work
As and when you return to work, try to keep your employer informed of how you're feeling and reacting. Your employer is under a duty to provide you with a safe working environment - and increasingly, that extends to emotional and psychological protection. They should respond sensitively to your return and avoid putting you under undue pressure in the first few weeks - if you're finding it difficult to cope, it's probably worth explaining this and making sure they're aware of the position.
It's bound to be a difficult transitional period and there's really no point in making it more stressful for yourself by putting a brave face on it all. If you try to pretend that all is well when it's really not, your work may well suffer, leaving you subject to disciplinary proceedings.
In general (and there will, sadly, always be employers who just don't behave in a reasonable or humane way), it's much better to be open and work together to try to effect a smooth return to work.
Finally, if your attack takes place while you're at work, your employer should be acting with still greater care, especially if they're in any way responsible for it - perhaps by failing to put in place adequate security arrangements. Clearly, litigation will be the last thing on your mind in the immediate aftermath, but when you're starting to feel stronger, it's certainly worth exploring the issue (perhaps initially talking to a solicitor or someone at a local CAB) to see what you may be entitled to by way of compensation.